1 /* packet-rpc.h (c) 1999 Uwe Girlich */
2 /* $Id: packet-rpc.h,v 1.6 1999/11/15 17:16:51 nneul Exp $ */
4 #ifndef __PACKET_RPC_H__
5 #define __PACKET_RPC_H__
9 #include "conversation.h"
11 #define EXTRACT_UINT(p,o) pntohl(&p[o])
21 #define MSG_ACCEPTED 0
30 #define PROG_UNAVAIL 1
31 #define PROG_MISMATCH 2
32 #define PROC_UNAVAIL 3
33 #define GARBAGE_ARGS 4
35 #define RPC_MISMATCH 0
38 #define AUTH_BADCRED 1
39 #define AUTH_REJECTEDCRED 2
40 #define AUTH_BADVERF 3
41 #define AUTH_REJECTEDVERF 4
42 #define AUTH_TOOWEAK 5
44 typedef int (dissect_function_t)(const u_char* pd, int offset, frame_data* fd, proto_tree* tree);
46 extern GHashTable *rpc_progs;
48 typedef struct _vsff {
51 dissect_function_t *dissect_call;
52 dissect_function_t *dissect_reply;
55 typedef struct _rpc_proc_info_key {
61 typedef struct _rpc_proc_info_value {
63 dissect_function_t *dissect_call;
64 dissect_function_t *dissect_reply;
65 } rpc_proc_info_value;
67 typedef struct _rpc_prog_info_key {
71 typedef struct _rpc_prog_info_value {
75 } rpc_prog_info_value;
77 typedef struct _rpc_call_info {
79 conversation_t *conversation;
84 rpc_proc_info_value* proc_info;
87 #define RPC_CALL_TABLE_LENGTH 1000
89 extern void rpc_call_insert(rpc_call_info *call);
90 extern rpc_call_info* rpc_call_lookup(rpc_call_info *call);
92 extern void rpc_init_proc_table(guint prog, guint vers, const vsff *proc_table);
93 extern void rpc_init_prog(int proto, guint32 prog, int ett);
94 extern char *rpc_prog_name(guint32 prog);
96 extern void init_dissect_rpc();
97 extern void cleanup_dissect_rpc();
99 extern unsigned int rpc_roundup(unsigned int a);
100 extern int dissect_rpc_string(const u_char *pd, int offset, frame_data *fd,
101 proto_tree *tree, int hfindex);
102 extern int dissect_rpc_uint32(const u_char *pd, int offset, frame_data *fd,
103 proto_tree *tree, char* name, char* type);
104 extern int dissect_rpc_uint64(const u_char *pd, int offset, frame_data *fd,
105 proto_tree *tree, char* name, char* type);
108 #endif /* packet-rpc.h */