dsniff  2.4b2
About: A collection of tools for network auditing
  Fossies Dox: dsniff-2.4b2.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

decode.h
Go to the documentation of this file.
1 /*
2  * decode.h
3  *
4  * Protocol decoding routines.
5  *
6  * Copyright (c) 2000 Dug Song <dugsong@monkey.org>
7  *
8  * $Id: decode.h,v 1.5 2001/03/15 08:33:06 dugsong Exp $
9  */
10 
11 #ifndef DECODE_H
12 #define DECODE_H
13 
14 typedef int (*decode_func)(u_char *, int, u_char *, int);
15 
16 struct decode {
17  char *dc_name;
19 };
20 
21 struct decode *getdecodebyname(const char *name);
22 
23 
24 #define pletohs(p) ((u_short) \
25  ((u_short)*((u_char *)p+1)<<8| \
26  (u_short)*((u_char *)p+0)<<0))
27 
28 #define pletohl(p) ((u_int32_t)*((u_char *)p+3)<<24| \
29  (u_int32_t)*((u_char *)p+2)<<16| \
30  (u_int32_t)*((u_char *)p+1)<<8| \
31  (u_int32_t)*((u_char *)p+0)<<0)
32 
33 #define pntohs(p) ((u_short) \
34  ((u_short)*((u_char *)p+1)<<0| \
35  (u_short)*((u_char *)p+0)<<8))
36 
37 #define pntohl(p) ((u_int32_t)*((u_char *)p+3)<<0| \
38  (u_int32_t)*((u_char *)p+2)<<18| \
39  (u_int32_t)*((u_char *)p+1)<<16| \
40  (u_int32_t)*((u_char *)p+0)<<24)
41 
42 int strip_telopts(u_char *buf, int len);
43 
44 int strip_lines(char *buf, int max_lines);
45 
46 int is_ascii_string(char *buf, int len);
47 
48 u_char *bufbuf(u_char *big, int blen, u_char *little, int llen);
49 
50 int decode_aim(u_char *buf, int len, u_char *obuf, int olen);
51 int decode_citrix(u_char *buf, int len, u_char *obuf, int olen);
52 int decode_cvs(u_char *buf, int len, u_char *obuf, int olen);
53 int decode_ftp(u_char *buf, int len, u_char *obuf, int olen);
54 int decode_hex(u_char *buf, int len, u_char *obuf, int olen);
55 int decode_http(u_char *buf, int len, u_char *obuf, int olen);
56 int decode_icq(u_char *buf, int len, u_char *obuf, int olen);
57 int decode_imap(u_char *buf, int len, u_char *obuf, int olen);
58 int decode_irc(u_char *buf, int len, u_char *obuf, int olen);
59 int decode_ldap(u_char *buf, int len, u_char *obuf, int olen);
60 int decode_mmxp(u_char *buf, int len, u_char *obuf, int olen);
61 int decode_mountd(u_char *buf, int len, u_char *obuf, int olen);
62 int decode_napster(u_char *buf, int len, u_char *obuf, int olen);
63 int decode_nntp(u_char *buf, int len, u_char *obuf, int olen);
64 int decode_oracle(u_char *buf, int len, u_char *obuf, int olen);
65 int decode_ospf(u_char *buf, int len, u_char *obuf, int olen);
66 int decode_pcanywhere(u_char *buf, int len, u_char *obuf, int olen);
67 int decode_pop(u_char *buf, int len, u_char *obuf, int olen);
68 int decode_poppass(u_char *buf, int len, u_char *obuf, int olen);
69 int decode_portmap(u_char *buf, int len, u_char *obuf, int olen);
70 int decode_postgresql(u_char *buf, int len, u_char *obuf, int olen);
71 int decode_pptp(u_char *buf, int len, u_char *obuf, int olen);
72 int decode_rip(u_char *buf, int len, u_char *obuf, int olen);
73 int decode_rlogin(u_char *buf, int len, u_char *obuf, int olen);
74 int decode_smb(u_char *buf, int len, u_char *obuf, int olen);
75 int decode_smtp(u_char *buf, int len, u_char *obuf, int olen);
76 int decode_sniffer(u_char *buf, int len, u_char *obuf, int olen);
77 int decode_snmp(u_char *buf, int len, u_char *obuf, int olen);
78 int decode_socks(u_char *buf, int len, u_char *obuf, int olen);
79 int decode_tds(u_char *buf, int len, u_char *obuf, int olen);
80 int decode_telnet(u_char *buf, int len, u_char *obuf, int olen);
81 int decode_vrrp(u_char *buf, int len, u_char *obuf, int olen);
82 int decode_x11(u_char *buf, int len, u_char *obuf, int olen);
83 int decode_yppasswd(u_char *buf, int len, u_char *obuf, int olen);
84 int decode_ypserv(u_char *buf, int len, u_char *obuf, int olen);
85 
86 #endif /* DECODE_H */
decode_napster
int decode_napster(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_napster.c:22
decode_rip
int decode_rip(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_rip.c:21
decode_snmp
int decode_snmp(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_snmp.c:24
decode_x11
int decode_x11(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_x11.c:21
decode_socks
int decode_socks(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_socks.c:21
decode_ftp
int decode_ftp(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_ftp.c:23
decode_ldap
int decode_ldap(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_ldap.c:23
decode_hex
int decode_hex(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_hex.c:26
decode_nntp
int decode_nntp(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_nntp.c:23
decode::dc_func
decode_func dc_func
Definition: decode.h:18
decode_postgresql
int decode_postgresql(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_postgresql.c:25
decode_pptp
int decode_pptp(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_pptp.c:86
decode_icq
int decode_icq(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_icq.c:58
decode_smb
int decode_smb(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_smb.c:32
bufbuf
u_char * bufbuf(u_char *big, int blen, u_char *little, int llen)
Definition: decode.c:193
decode_vrrp
int decode_vrrp(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_vrrp.c:39
decode_pop
int decode_pop(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_pop.c:44
decode_yppasswd
int decode_yppasswd(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_yp.c:71
decode_oracle
int decode_oracle(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_oracle.c:22
buf
Definition: buf.h:14
strip_telopts
int strip_telopts(u_char *buf, int len)
Definition: decode.c:110
decode_mmxp
int decode_mmxp(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_mmxp.c:33
decode_ypserv
int decode_ypserv(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_yp.c:102
decode_irc
int decode_irc(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_irc.c:22
decode_rlogin
int decode_rlogin(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_rlogin.c:22
decode
Definition: decode.h:16
decode_imap
int decode_imap(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_imap.c:22
decode_ospf
int decode_ospf(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_ospf.c:21
decode_telnet
int decode_telnet(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_telnet.c:22
getdecodebyname
struct decode * getdecodebyname(const char *name)
Definition: decode.c:97
strip_lines
int strip_lines(char *buf, int max_lines)
Definition: decode.c:159
decode_portmap
int decode_portmap(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_portmap.c:27
decode_poppass
int decode_poppass(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_pop.c:23
decode_mountd
int decode_mountd(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_mountd.c:29
decode_tds
int decode_tds(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_tds.c:131
is_ascii_string
int is_ascii_string(char *buf, int len)
Definition: decode.c:182
decode::dc_name
char * dc_name
Definition: decode.h:17
decode_pcanywhere
int decode_pcanywhere(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_pcanywhere.c:25
decode_cvs
int decode_cvs(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_cvs.c:41
decode_http
int decode_http(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_http.c:96
obuf
static char obuf[4096]
Definition: trigger.c:43
decode_citrix
int decode_citrix(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_citrix.c:30
decode_aim
int decode_aim(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_aim.c:37
decode_smtp
int decode_smtp(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_smtp.c:23
decode_sniffer
int decode_sniffer(u_char *buf, int len, u_char *obuf, int olen)
Definition: decode_sniffer.c:23
decode_func
int(* decode_func)(u_char *, int, u_char *, int)
Definition: decode.h:14