tcpdump  4.99.1
About: tcpdump is a tool for network monitoring and data acquisition.
  Fossies Dox: tcpdump-4.99.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

print.c File Reference
#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include "netdissect-stdinc.h"
#include "netdissect.h"
#include "addrtoname.h"
#include "print.h"
#include "netdissect-alloc.h"
#include "pcap-missing.h"
Include dependency graph for print.c:

Go to the source code of this file.

Data Structures

struct  printer
 

Functions

static void ndo_default_print (netdissect_options *ndo, const u_char *bp, u_int length)
 
static void ndo_error (netdissect_options *ndo, status_exit_codes_t status, const char *fmt,...)
 
static void ndo_warning (netdissect_options *ndo, const char *fmt,...)
 
static int ndo_printf (netdissect_options *ndo, const char *fmt,...)
 
void init_print (netdissect_options *ndo, uint32_t localnet, uint32_t mask)
 
if_printer lookup_printer (int type)
 
int has_printer (int type)
 
if_printer get_if_printer (int type)
 
void pretty_print_packet (netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *sp, u_int packets_captured)
 
void ndo_set_function_pointers (netdissect_options *ndo)
 

Variables

static const struct printer printers []
 

Function Documentation

◆ get_if_printer()

if_printer get_if_printer ( int  type)

Definition at line 316 of file print.c.

References lookup_printer(), printer::type, and unsupported_if_print().

Referenced by main().

◆ has_printer()

int has_printer ( int  type)

Definition at line 310 of file print.c.

References lookup_printer(), and printer::type.

◆ init_print()

void init_print ( netdissect_options ndo,
uint32_t  localnet,
uint32_t  mask 
)

Definition at line 265 of file print.c.

References init_addrtoname(), and init_checksum().

Referenced by main().

◆ lookup_printer()

if_printer lookup_printer ( int  type)

Definition at line 273 of file print.c.

References printer::f, printers, and printer::type.

Referenced by get_if_printer(), and has_printer().

◆ ndo_default_print()

static void ndo_default_print ( netdissect_options ndo,
const u_char *  bp,
u_int  length 
)
static

Definition at line 503 of file print.c.

References hex_and_ascii_print().

Referenced by ndo_set_function_pointers().

◆ ndo_error()

static void ndo_error ( netdissect_options ndo,
status_exit_codes_t  status,
const char *  fmt,
  ... 
)
static

Definition at line 510 of file print.c.

References nd_cleanup(), and netdissect_options::program_name.

Referenced by ndo_printf(), and ndo_set_function_pointers().

◆ ndo_printf()

static int ndo_printf ( netdissect_options ndo,
const char *  fmt,
  ... 
)
static

Definition at line 550 of file print.c.

References ndo_error(), and S_ERR_ND_WRITE_FILE.

Referenced by ndo_set_function_pointers().

◆ ndo_set_function_pointers()

◆ ndo_warning()

static void ndo_warning ( netdissect_options ndo,
const char *  fmt,
  ... 
)
static

Definition at line 532 of file print.c.

References netdissect_options::program_name.

Referenced by ndo_set_function_pointers().

◆ pretty_print_packet()

Variable Documentation

◆ printers

const struct printer printers[]
static

Definition at line 1 of file print.c.

Referenced by lookup_printer().