Subversion Repositories HelenOS

Rev

Rev 2880 | Rev 2894 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2873 svoboda 1
/** @addtogroup sctrace
2
 * @{
3
 */
4
/** @file
5
 */
6
 
7
#ifndef PROTO_H_
8
#define PROTO_H_
9
 
2878 svoboda 10
#include <libadt/hash_table.h>
11
 
2873 svoboda 12
typedef struct {
13
    char *name;
2880 svoboda 14
} oper_t;
15
 
16
typedef struct {
17
    /** Protocol name */
18
    char *name;
19
 
20
    /** Maps method number to operation */
21
    hash_table_t method_oper;
2873 svoboda 22
} proto_t;
23
 
2878 svoboda 24
/* Maps service number to protocol */
25
extern hash_table_t srv_proto;
26
 
27
void proto_init(void);
28
void proto_cleanup(void);
2880 svoboda 29
 
2878 svoboda 30
void proto_register(int srv, proto_t *proto);
31
proto_t *proto_get_by_srv(int srv);
2880 svoboda 32
proto_t *proto_new(char *name);
33
void proto_add_oper(proto_t *proto, int method, oper_t *oper);
34
oper_t *proto_get_oper(proto_t *proto, int method);
2878 svoboda 35
 
2883 svoboda 36
oper_t *oper_new(char *name);
37
 
38
 
2873 svoboda 39
#endif
40
 
41
/** @}
42
 */