/** @addtogroup sctrace
* @{
*/
/** @file
*/
#ifndef PROTO_H_
#define PROTO_H_
#include <libadt/hash_table.h>
typedef struct {
char *name;
} oper_t;
typedef struct {
/** Protocol name */
char *name;
/** Maps method number to operation */
hash_table_t method_oper;
} proto_t;
/* Maps service number to protocol */
extern hash_table_t srv_proto;
void proto_init(void);
void proto_cleanup(void);
void proto_register(int srv, proto_t *proto);
proto_t *proto_get_by_srv(int srv);
proto_t *proto_new(char *name);
void proto_add_oper(proto_t *proto, int method, oper_t *oper);
oper_t *proto_get_oper(proto_t *proto, int method);
oper_t *oper_new(char *name);
#endif
/** @}
*/