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)  

buf.c File Reference
#include "config.h"
#include <sys/param.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <ctype.h>
#include <err.h>
#include "buf.h"
Include dependency graph for buf.c:

Go to the source code of this file.

Functions

void buf_init (buf_t buf, u_char *data, int len)
 
buf_t buf_new (int size)
 
void buf_free (buf_t buf)
 
int buf_seek (buf_t buf, int off, int whence)
 
int buf_get (buf_t buf, void *dst, int len)
 
int buf_put (buf_t buf, void *src, int len)
 
int buf_putf (buf_t buf, const char *fmt,...)
 
void buf_end (buf_t buf)
 
int buf_index (buf_t buf, void *ptr, int len)
 
int buf_rindex (buf_t buf, void *ptr, int len)
 
int buf_cmp (buf_t buf, void *ptr, int len)
 
buf_t buf_tok (buf_t buf, void *sep, int len)
 
buf_t buf_getbuf (buf_t buf, int offset, int len)
 
buf_t buf_getword (buf_t buf, void *sep, int len)
 
char * buf_strdup (buf_t buf)
 
int buf_isascii (buf_t buf)
 

Function Documentation

◆ buf_cmp()

int buf_cmp ( buf_t  buf,
void *  ptr,
int  len 
)

◆ buf_end()

◆ buf_free()

void buf_free ( buf_t  buf)

Definition at line 51 of file buf.c.

References buf::base.

Referenced by client_request(), process_aim(), process_irc(), process_msn(), and process_yahoo().

◆ buf_get()

int buf_get ( buf_t  buf,
void *  dst,
int  len 
)

◆ buf_getbuf()

buf_t buf_getbuf ( buf_t  buf,
int  offset,
int  len 
)

Definition at line 199 of file buf.c.

References buf_end(), buf_new(), buf_ptr, buf_put(), buf_skip, buf::end, and buf::offset.

Referenced by process_aim().

◆ buf_getword()

buf_t buf_getword ( buf_t  buf,
void *  sep,
int  len 
)

◆ buf_index()

◆ buf_init()

◆ buf_isascii()

int buf_isascii ( buf_t  buf)

Definition at line 253 of file buf.c.

References buf::base, buf_ptr, and buf::end.

Referenced by decode_ftp().

◆ buf_new()

buf_t buf_new ( int  size)

Definition at line 32 of file buf.c.

References buf::base, buf, buf::end, buf::offset, and buf::size.

Referenced by buf_getbuf(), and buf_getword().

◆ buf_put()

int buf_put ( buf_t  buf,
void *  src,
int  len 
)

◆ buf_putf()

int buf_putf ( buf_t  buf,
const char *  fmt,
  ... 
)

◆ buf_rindex()

int buf_rindex ( buf_t  buf,
void *  ptr,
int  len 
)

Definition at line 143 of file buf.c.

References buf::base, buf_ptr, buf::end, and memcmp().

Referenced by process_msn().

◆ buf_seek()

int buf_seek ( buf_t  buf,
int  off,
int  whence 
)

Definition at line 60 of file buf.c.

References buf::offset, and buf::size.

Referenced by decode_hex(), and decode_icq().

◆ buf_strdup()

char* buf_strdup ( buf_t  buf)

Definition at line 235 of file buf.c.

References buf_len, buf_ptr, and err().

Referenced by client_request(), decode_snmp(), process_aim(), process_irc(), process_msn(), process_yahoo(), and server_init().

◆ buf_tok()