tcpflow  1.6.1
About: tcpflow is a TCP/IP packet demultiplexer that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis and debugging.
  Fossies Dox: tcpflow-1.6.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

util.h
Go to the documentation of this file.
1 #ifndef __WIFIPCAP_UTIL_H_
2 #define __WIFIPCAP_UTIL_H_
3 
4 #include <ostream>
5 
6 typedef unsigned char uint8_t;
7 typedef unsigned short uint16_t;
8 #ifdef _WIN32
9 typedef unsigned long long uint64_t;
10 #endif
11 
12 #if 0
13 struct MAC {
14  uint64_t val;
15  MAC() {}
16  MAC(const uint8_t *stream);
17  MAC(uint64_t val);
18  MAC(const char *str);
19  MAC(const MAC& o);
20 
21  bool operator==(const MAC& o) const {
22  return val == o.val;
23  }
24  bool operator!=(const MAC& o) const {
25  return val != o.val;
26  }
27  bool operator<(const MAC& o) const {
28  return val < o.val;
29  }
30 
32 
33  static MAC broadcast;
34  static MAC null;
35  static int print_fmt;
36 };
37 
38 std::ostream& operator<<(std::ostream& out, const MAC& mac);
39 std::ostream& operator<<(std::ostream& out, const struct in_addr& ip);
40 #endif
41 
42 char *va(const char *format, ...);
43 
44 struct tok {
45  int v; /* value */
46  const char *s; /* string */
47 };
48 
49 extern const char *
50 tok2str(register const struct tok *lp, register const char *fmt,
51  register int v);
52 
53 #endif
std::ostream & operator<<(std::ostream &os, const class scanner_params &sp)
Definition: wifipcap.h:118
@ PRINT_FMT_COLON
Definition: wifipcap.h:119
@ PRINT_FMT_PLAIN
Definition: wifipcap.h:119
MAC()
Definition: wifipcap.h:121
bool operator!=(const MAC &o) const
Definition: wifipcap.h:154
uint64_t val
Definition: wifipcap.h:120
bool operator==(const MAC &o) const
Definition: wifipcap.h:153
bool operator<(const MAC &o) const
Definition: wifipcap.h:155
static MAC broadcast
Definition: wifipcap.h:161
static int print_fmt
Definition: wifipcap.h:163
Definition: ip.h:50
Definition: util.h:44
const char * s
Definition: util.h:46
int v
Definition: util.h:45
unsigned short uint16_t
Definition: util.h:7
const char * tok2str(register const struct tok *lp, register const char *fmt, register int v)
char * va(const char *format,...)
unsigned char uint8_t
Definition: util.h:6