-
Notifications
You must be signed in to change notification settings - Fork 0
/
stable.h
42 lines (34 loc) · 882 Bytes
/
stable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* interface and data structures associated table holding offered services
*/
#ifndef _STABLE_H_INCLUDED_
#define _STABLE_H_INCLUDED_
#include "tslist.h"
typedef struct s_record {
struct s_record *s_next;
char *s_name;
TSList s_queue;
} SRecord;
/*
* initialize the data structures for holding offered services
*/
void stable_init();
/*
* create a new offered service; return NULL if error or if record exists
*/
SRecord *stable_create(char *serviceName);
/*
* lookup the service record associated with a particular 8-char service name
*
* if successful, returns the associated service record
* if not, returns NULL
*/
SRecord *stable_lookup(char *name);
/*
* destroy the service associated with a particular service name
*
* there is no return value
*/
void stable_destroy(SRecord *sr);
void stable_dump(void);
#endif /* _STABLE_H_INCLUDED_ */