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 File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  decode
 

Macros

#define pletohs(p)
 
#define pletohl(p)
 
#define pntohs(p)
 
#define pntohl(p)
 

Typedefs

typedef int(* decode_func) (u_char *, int, u_char *, int)
 

Functions

struct decodegetdecodebyname (const char *name)
 
int strip_telopts (u_char *buf, int len)
 
int strip_lines (char *buf, int max_lines)
 
int is_ascii_string (char *buf, int len)
 
u_char * bufbuf (u_char *big, int blen, u_char *little, int llen)
 
int decode_aim (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_citrix (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_cvs (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_ftp (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_hex (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_http (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_icq (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_imap (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_irc (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_ldap (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_mmxp (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_mountd (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_napster (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_nntp (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_oracle (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_ospf (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_pcanywhere (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_pop (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_poppass (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_portmap (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_postgresql (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_pptp (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_rip (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_rlogin (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_smb (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_smtp (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_sniffer (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_snmp (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_socks (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_tds (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_telnet (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_vrrp (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_x11 (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_yppasswd (u_char *buf, int len, u_char *obuf, int olen)
 
int decode_ypserv (u_char *buf, int len, u_char *obuf, int olen)
 

Macro Definition Documentation

◆ pletohl

#define pletohl (   p)
Value:
((u_int32_t)*((u_char *)p+3)<<24| \
(u_int32_t)*((u_char *)p+2)<<16| \
(u_int32_t)*((u_char *)p+1)<<8| \
(u_int32_t)*((u_char *)p+0)<<0)

Definition at line 28 of file decode.h.

◆ pletohs

#define pletohs (   p)
Value:
((u_short) \
((u_short)*((u_char *)p+1)<<8| \
(u_short)*((u_char *)p+0)<<0))

Definition at line 24 of file decode.h.

◆ pntohl

#define pntohl (   p)
Value:
((u_int32_t)*((u_char *)p+3)<<0| \
(u_int32_t)*((u_char *)p+2)<<18| \
(u_int32_t)*((u_char *)p+1)<<16| \
(u_int32_t)*((u_char *)p+0)<<24)

Definition at line 37 of file decode.h.

◆ pntohs

#define pntohs (   p)
Value:
((u_short) \
((u_short)*((u_char *)p+1)<<0| \
(u_short)*((u_char *)p+0)<<8))

Definition at line 33 of file decode.h.

Typedef Documentation

◆ decode_func

typedef int(* decode_func) (u_char *, int, u_char *, int)

Definition at line 14 of file decode.h.

Function Documentation

◆ bufbuf()

u_char* bufbuf ( u_char *  big,
int  blen,
u_char *  little,
int  llen 
)

Definition at line 193 of file decode.c.

References memcmp().

Referenced by decode_oracle(), and strip_telopts().

◆ decode_aim()

int decode_aim ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_citrix()

int decode_citrix ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 30 of file decode_citrix.c.

References buf_end(), buf_get(), buf_index(), buf_init(), buf_len, buf_put(), buf_skip, ica_magic, and obuf.

◆ decode_cvs()

int decode_cvs ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_ftp()

int decode_ftp ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_hex()

int decode_hex ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 26 of file decode_hex.c.

References buf_end(), buf_get(), buf_init(), buf_len, buf_put(), buf_putf(), buf_seek(), buf_tell, and obuf.

◆ decode_http()

int decode_http ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_icq()

int decode_icq ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_imap()

int decode_imap ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 22 of file decode_imap.c.

References buf_cmp(), buf_end(), buf_index(), buf_init(), buf_len, buf_ptr, buf_putf(), buf_skip, buf_tok(), and obuf.

◆ decode_irc()

int decode_irc ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_ldap()

int decode_ldap ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_mmxp()

int decode_mmxp ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_mountd()

int decode_mountd ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_napster()

int decode_napster ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 22 of file decode_napster.c.

References buf_end(), buf_get(), buf_init(), buf_len, buf_ptr, buf_put(), obuf, and pletohs.

◆ decode_nntp()

int decode_nntp ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 23 of file decode_nntp.c.

References base64_pton(), obuf, and strlcat().

◆ decode_oracle()

int decode_oracle ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 22 of file decode_oracle.c.

References buf, bufbuf(), memcmp(), obuf, and pntohs.

◆ decode_ospf()

int decode_ospf ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 21 of file decode_ospf.c.

References obuf, and pntohs.

◆ decode_pcanywhere()

int decode_pcanywhere ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_pop()

int decode_pop ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 44 of file decode_pop.c.

References base64_pton(), obuf, and strlcat().

◆ decode_poppass()

int decode_poppass ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 23 of file decode_pop.c.

References obuf, Opt_lines, strip_lines(), and strlcat().

◆ decode_portmap()

int decode_portmap ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_postgresql()

int decode_postgresql ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 25 of file decode_postgresql.c.

References db, obuf, pntohl, and STARTUP_PKTLEN.

◆ decode_pptp()

◆ decode_rip()

int decode_rip ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 21 of file decode_rip.c.

References memcmp(), and obuf.

◆ decode_rlogin()

int decode_rlogin ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 22 of file decode_rlogin.c.

References obuf, Opt_lines, strip_lines(), strlcat(), and strlcpy().

◆ decode_smb()

int decode_smb ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 32 of file decode_smb.c.

References smbhdr::cmd, is_ascii_string(), memcmp(), obuf, pletohs, smbhdr::proto, and strlcat().

◆ decode_smtp()

int decode_smtp ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 23 of file decode_smtp.c.

References base64_pton(), obuf, and strlcat().

◆ decode_sniffer()

int decode_sniffer ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 23 of file decode_sniffer.c.

References base64_pton(), obuf, pletohl, pletohs, strlcat(), and strlcpy().

◆ decode_snmp()

int decode_snmp ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_socks()

int decode_socks ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 21 of file decode_socks.c.

References buf, obuf, and strlcat().

◆ decode_tds()

◆ decode_telnet()

int decode_telnet ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 22 of file decode_telnet.c.

References is_ascii_string(), obuf, Opt_lines, strip_lines(), strip_telopts(), and strlcpy().

◆ decode_vrrp()

int decode_vrrp ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_x11()

int decode_x11 ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 21 of file decode_x11.c.

References obuf, strlcat(), and strlcpy().

◆ decode_yppasswd()

int decode_yppasswd ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

◆ decode_ypserv()

int decode_ypserv ( u_char *  buf,
int  len,
u_char *  obuf,
int  olen 
)

Definition at line 102 of file decode_yp.c.

References xid_map::data, obuf, rpc_decode(), xid_map_enter(), and xid_map_find().

◆ getdecodebyname()

struct decode* getdecodebyname ( const char *  name)

Definition at line 97 of file decode.c.

References decode::dc_name, and decodes.

Referenced by trigger_set_ip(), trigger_set_rpc(), trigger_set_tcp(), and trigger_set_udp().

◆ is_ascii_string()

int is_ascii_string ( char *  buf,
int  len 
)

Definition at line 182 of file decode.c.

Referenced by decode_smb(), and decode_telnet().

◆ strip_lines()

int strip_lines ( char *  buf,
int  max_lines 
)

Definition at line 159 of file decode.c.

Referenced by decode_poppass(), decode_rlogin(), and decode_telnet().

◆ strip_telopts()

int strip_telopts ( u_char *  buf,
int  len 
)

Definition at line 110 of file decode.c.

References bufbuf().

Referenced by decode_ftp(), and decode_telnet().