Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

pcap-bpf.h File Reference

Go to the source code of this file.

Classes

struct  bpf_program
 A BPF pseudo-assembly program. More...
struct  bpf_version
struct  bpf_insn
 A single BPF pseudo-instruction. More...

Defines

#define BPF_RELEASE   199606
#define BPF_ALIGNMENT   sizeof(bpf_int32)
#define BPF_WORDALIGN(x)   (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
#define BPF_MAXINSNS   512
#define BPF_MAXBUFSIZE   0x8000
#define BPF_MINBUFSIZE   32
#define BPF_MAJOR_VERSION   1
#define BPF_MINOR_VERSION   1
#define DLT_NULL   0
#define DLT_EN10MB   1
#define DLT_EN3MB   2
#define DLT_AX25   3
#define DLT_PRONET   4
#define DLT_CHAOS   5
#define DLT_IEEE802   6
#define DLT_ARCNET   7
#define DLT_SLIP   8
#define DLT_PPP   9
#define DLT_FDDI   10
#define DLT_ATM_RFC1483   11
#define DLT_RAW   12
#define DLT_SLIP_BSDOS   15
#define DLT_PPP_BSDOS   16
#define DLT_ATM_CLIP   19
#define DLT_REDBACK_SMARTEDGE   32
#define DLT_PPP_SERIAL   50
#define DLT_PPP_ETHER   51
#define DLT_SYMANTEC_FIREWALL   99
#define DLT_C_HDLC   104
#define DLT_CHDLC   DLT_C_HDLC
#define DLT_IEEE802_11   105
#define DLT_FRELAY   107
#define DLT_LOOP   108
#define DLT_ENC   109
#define DLT_LINUX_SLL   113
#define DLT_LTALK   114
#define DLT_ECONET   115
#define DLT_IPFILTER   116
#define DLT_PFLOG   117
#define DLT_CISCO_IOS   118
#define DLT_PRISM_HEADER   119
#define DLT_AIRONET_HEADER   120
#define DLT_HHDLC   121
#define DLT_IP_OVER_FC   122
#define DLT_SUNATM   123
#define DLT_RIO   124
#define DLT_PCI_EXP   125
#define DLT_AURORA   126
#define DLT_IEEE802_11_RADIO   127
#define DLT_TZSP   128
#define DLT_ARCNET_LINUX   129
#define DLT_JUNIPER_MLPPP   130
#define DLT_JUNIPER_MLFR   131
#define DLT_JUNIPER_ES   132
#define DLT_JUNIPER_GGSN   133
#define DLT_JUNIPER_MFR   134
#define DLT_JUNIPER_ATM2   135
#define DLT_JUNIPER_SERVICES   136
#define DLT_JUNIPER_ATM1   137
#define DLT_APPLE_IP_OVER_IEEE1394   138
#define DLT_MTP2_WITH_PHDR   139
#define DLT_MTP2   140
#define DLT_MTP3   141
#define DLT_SCCP   142
#define DLT_DOCSIS   143
#define DLT_LINUX_IRDA   144
#define DLT_IBM_SP   145
#define DLT_IBM_SN   146
#define DLT_USER0   147
#define DLT_USER1   148
#define DLT_USER2   149
#define DLT_USER3   150
#define DLT_USER4   151
#define DLT_USER5   152
#define DLT_USER6   153
#define DLT_USER7   154
#define DLT_USER8   155
#define DLT_USER9   156
#define DLT_USER10   157
#define DLT_USER11   158
#define DLT_USER12   159
#define DLT_USER13   160
#define DLT_USER14   161
#define DLT_USER15   162
#define DLT_IEEE802_11_RADIO_AVS   163
#define DLT_JUNIPER_MONITOR   164
#define DLT_BACNET_MS_TP   165
#define DLT_PPP_PPPD   166
#define DLT_PPP_WITH_DIRECTION   DLT_PPP_PPPD
#define DLT_LINUX_PPP_WITHDIRECTION   DLT_PPP_PPPD
#define DLT_JUNIPER_PPPOE   167
#define DLT_JUNIPER_PPPOE_ATM   168
#define DLT_GPRS_LLC   169
#define DLT_GPF_T   170
#define DLT_GPF_F   171
#define DLT_GCOM_T1E1   172
#define DLT_GCOM_SERIAL   173
#define DLT_JUNIPER_PIC_PEER   174
#define DLT_ERF_ETH   175
#define DLT_ERF_POS   176
#define DLT_LINUX_LAPD   177
#define BPF_CLASS(code)   ((code) & 0x07)
#define BPF_LD   0x00
#define BPF_LDX   0x01
#define BPF_ST   0x02
#define BPF_STX   0x03
#define BPF_ALU   0x04
#define BPF_JMP   0x05
#define BPF_RET   0x06
#define BPF_MISC   0x07
#define BPF_SIZE(code)   ((code) & 0x18)
#define BPF_W   0x00
#define BPF_H   0x08
#define BPF_B   0x10
#define BPF_MODE(code)   ((code) & 0xe0)
#define BPF_IMM   0x00
#define BPF_ABS   0x20
#define BPF_IND   0x40
#define BPF_MEM   0x60
#define BPF_LEN   0x80
#define BPF_MSH   0xa0
#define BPF_OP(code)   ((code) & 0xf0)
#define BPF_ADD   0x00
#define BPF_SUB   0x10
#define BPF_MUL   0x20
#define BPF_DIV   0x30
#define BPF_OR   0x40
#define BPF_AND   0x50
#define BPF_LSH   0x60
#define BPF_RSH   0x70
#define BPF_NEG   0x80
#define BPF_JA   0x00
#define BPF_JEQ   0x10
#define BPF_JGT   0x20
#define BPF_JGE   0x30
#define BPF_JSET   0x40
#define BPF_SRC(code)   ((code) & 0x08)
#define BPF_K   0x00
#define BPF_X   0x08
#define BPF_RVAL(code)   ((code) & 0x18)
#define BPF_A   0x10
#define BPF_MISCOP(code)   ((code) & 0xf8)
#define BPF_TAX   0x00
#define BPF_TXA   0x80
#define BPF_STMT(code, k)   { (u_short)(code), 0, 0, k }
#define BPF_JUMP(code, k, jt, jf)   { (u_short)(code), jt, jf, k }
#define BPF_MEMWORDS   16

Typedefs

typedef int bpf_int32
typedef u_int bpf_u_int32

Functions

int bpf_validate ()
u_int bpf_filter ()


Define Documentation

#define BPF_A   0x10
 

Definition at line 645 of file pcap-bpf.h.

#define BPF_ABS   0x20
 

Definition at line 617 of file pcap-bpf.h.

#define BPF_ADD   0x00
 

Definition at line 625 of file pcap-bpf.h.

#define BPF_ALIGNMENT   sizeof(bpf_int32)
 

Definition at line 76 of file pcap-bpf.h.

#define BPF_ALU   0x04
 

Definition at line 605 of file pcap-bpf.h.

#define BPF_AND   0x50
 

Definition at line 630 of file pcap-bpf.h.

#define BPF_B   0x10
 

Definition at line 614 of file pcap-bpf.h.

#define BPF_CLASS code   )     ((code) & 0x07)
 

Definition at line 600 of file pcap-bpf.h.

#define BPF_DIV   0x30
 

Definition at line 628 of file pcap-bpf.h.

#define BPF_H   0x08
 

Definition at line 613 of file pcap-bpf.h.

#define BPF_IMM   0x00
 

Definition at line 616 of file pcap-bpf.h.

#define BPF_IND   0x40
 

Definition at line 618 of file pcap-bpf.h.

#define BPF_JA   0x00
 

Definition at line 634 of file pcap-bpf.h.

#define BPF_JEQ   0x10
 

Definition at line 635 of file pcap-bpf.h.

#define BPF_JGE   0x30
 

Definition at line 637 of file pcap-bpf.h.

#define BPF_JGT   0x20
 

Definition at line 636 of file pcap-bpf.h.

#define BPF_JMP   0x05
 

Definition at line 606 of file pcap-bpf.h.

#define BPF_JSET   0x40
 

Definition at line 638 of file pcap-bpf.h.

#define BPF_JUMP code,
k,
jt,
jf   )     { (u_short)(code), jt, jf, k }
 

Definition at line 666 of file pcap-bpf.h.

#define BPF_K   0x00
 

Definition at line 640 of file pcap-bpf.h.

#define BPF_LD   0x00
 

Definition at line 601 of file pcap-bpf.h.

#define BPF_LDX   0x01
 

Definition at line 602 of file pcap-bpf.h.

#define BPF_LEN   0x80
 

Definition at line 620 of file pcap-bpf.h.

#define BPF_LSH   0x60
 

Definition at line 631 of file pcap-bpf.h.

#define BPF_MAJOR_VERSION   1
 

Definition at line 110 of file pcap-bpf.h.

#define BPF_MAXBUFSIZE   0x8000
 

Definition at line 83 of file pcap-bpf.h.

#define BPF_MAXINSNS   512
 

Definition at line 82 of file pcap-bpf.h.

#define BPF_MEM   0x60
 

Definition at line 619 of file pcap-bpf.h.

#define BPF_MEMWORDS   16
 

Definition at line 679 of file pcap-bpf.h.

#define BPF_MINBUFSIZE   32
 

Definition at line 84 of file pcap-bpf.h.

#define BPF_MINOR_VERSION   1
 

Definition at line 111 of file pcap-bpf.h.

#define BPF_MISC   0x07
 

Definition at line 608 of file pcap-bpf.h.

#define BPF_MISCOP code   )     ((code) & 0xf8)
 

Definition at line 648 of file pcap-bpf.h.

#define BPF_MODE code   )     ((code) & 0xe0)
 

Definition at line 615 of file pcap-bpf.h.

#define BPF_MSH   0xa0
 

Definition at line 621 of file pcap-bpf.h.

#define BPF_MUL   0x20
 

Definition at line 627 of file pcap-bpf.h.

#define BPF_NEG   0x80
 

Definition at line 633 of file pcap-bpf.h.

#define BPF_OP code   )     ((code) & 0xf0)
 

Definition at line 624 of file pcap-bpf.h.

#define BPF_OR   0x40
 

Definition at line 629 of file pcap-bpf.h.

#define BPF_RELEASE   199606
 

Definition at line 61 of file pcap-bpf.h.

#define BPF_RET   0x06
 

Definition at line 607 of file pcap-bpf.h.

#define BPF_RSH   0x70
 

Definition at line 632 of file pcap-bpf.h.

#define BPF_RVAL code   )     ((code) & 0x18)
 

Definition at line 644 of file pcap-bpf.h.

#define BPF_SIZE code   )     ((code) & 0x18)
 

Definition at line 611 of file pcap-bpf.h.

#define BPF_SRC code   )     ((code) & 0x08)
 

Definition at line 639 of file pcap-bpf.h.

#define BPF_ST   0x02
 

Definition at line 603 of file pcap-bpf.h.

#define BPF_STMT code,
 )     { (u_short)(code), 0, 0, k }
 

Definition at line 665 of file pcap-bpf.h.

#define BPF_STX   0x03
 

Definition at line 604 of file pcap-bpf.h.

#define BPF_SUB   0x10
 

Definition at line 626 of file pcap-bpf.h.

#define BPF_TAX   0x00
 

Definition at line 649 of file pcap-bpf.h.

#define BPF_TXA   0x80
 

Definition at line 650 of file pcap-bpf.h.

#define BPF_W   0x00
 

Definition at line 612 of file pcap-bpf.h.

#define BPF_WORDALIGN  )     (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
 

Definition at line 80 of file pcap-bpf.h.

#define BPF_X   0x08
 

Definition at line 641 of file pcap-bpf.h.

#define DLT_AIRONET_HEADER   120
 

Definition at line 322 of file pcap-bpf.h.

#define DLT_APPLE_IP_OVER_IEEE1394   138
 

Definition at line 423 of file pcap-bpf.h.

#define DLT_ARCNET   7
 

Definition at line 136 of file pcap-bpf.h.

#define DLT_ARCNET_LINUX   129
 

Definition at line 391 of file pcap-bpf.h.

#define DLT_ATM_CLIP   19
 

Definition at line 180 of file pcap-bpf.h.

#define DLT_ATM_RFC1483   11
 

Definition at line 150 of file pcap-bpf.h.

#define DLT_AURORA   126
 

Definition at line 361 of file pcap-bpf.h.

#define DLT_AX25   3
 

Definition at line 132 of file pcap-bpf.h.

#define DLT_BACNET_MS_TP   165
 

Definition at line 527 of file pcap-bpf.h.

#define DLT_C_HDLC   104
 

Definition at line 225 of file pcap-bpf.h.

#define DLT_CHAOS   5
 

Definition at line 134 of file pcap-bpf.h.

#define DLT_CHDLC   DLT_C_HDLC
 

Definition at line 226 of file pcap-bpf.h.

#define DLT_CISCO_IOS   118
 

Definition at line 309 of file pcap-bpf.h.

#define DLT_DOCSIS   143
 

Definition at line 437 of file pcap-bpf.h.

#define DLT_ECONET   115
 

Definition at line 287 of file pcap-bpf.h.

#define DLT_EN10MB   1
 

Definition at line 130 of file pcap-bpf.h.

#define DLT_EN3MB   2
 

Definition at line 131 of file pcap-bpf.h.

#define DLT_ENC   109
 

Definition at line 264 of file pcap-bpf.h.

Referenced by SetPktProcessor().

#define DLT_ERF_ETH   175
 

Definition at line 585 of file pcap-bpf.h.

#define DLT_ERF_POS   176
 

Definition at line 586 of file pcap-bpf.h.

#define DLT_FDDI   10
 

Definition at line 139 of file pcap-bpf.h.

#define DLT_FRELAY   107
 

Definition at line 243 of file pcap-bpf.h.

#define DLT_GCOM_SERIAL   173
 

Definition at line 570 of file pcap-bpf.h.

#define DLT_GCOM_T1E1   172
 

Definition at line 569 of file pcap-bpf.h.

#define DLT_GPF_F   171
 

Definition at line 563 of file pcap-bpf.h.

#define DLT_GPF_T   170
 

Definition at line 562 of file pcap-bpf.h.

#define DLT_GPRS_LLC   169
 

Definition at line 561 of file pcap-bpf.h.

#define DLT_HHDLC   121
 

Definition at line 327 of file pcap-bpf.h.

#define DLT_IBM_SN   146
 

Definition at line 460 of file pcap-bpf.h.

#define DLT_IBM_SP   145
 

Definition at line 459 of file pcap-bpf.h.

#define DLT_IEEE802   6
 

Definition at line 135 of file pcap-bpf.h.

#define DLT_IEEE802_11   105
 

Definition at line 228 of file pcap-bpf.h.

#define DLT_IEEE802_11_RADIO   127
 

Definition at line 368 of file pcap-bpf.h.

#define DLT_IEEE802_11_RADIO_AVS   163
 

Definition at line 514 of file pcap-bpf.h.

#define DLT_IP_OVER_FC   122
 

Definition at line 337 of file pcap-bpf.h.

#define DLT_IPFILTER   116
 

Definition at line 292 of file pcap-bpf.h.

#define DLT_JUNIPER_ATM1   137
 

Definition at line 406 of file pcap-bpf.h.

#define DLT_JUNIPER_ATM2   135
 

Definition at line 404 of file pcap-bpf.h.

#define DLT_JUNIPER_ES   132
 

Definition at line 401 of file pcap-bpf.h.

#define DLT_JUNIPER_GGSN   133
 

Definition at line 402 of file pcap-bpf.h.

#define DLT_JUNIPER_MFR   134
 

Definition at line 403 of file pcap-bpf.h.

#define DLT_JUNIPER_MLFR   131
 

Definition at line 400 of file pcap-bpf.h.

#define DLT_JUNIPER_MLPPP   130
 

Definition at line 399 of file pcap-bpf.h.

#define DLT_JUNIPER_MONITOR   164
 

Definition at line 522 of file pcap-bpf.h.

#define DLT_JUNIPER_PIC_PEER   174
 

Definition at line 577 of file pcap-bpf.h.

#define DLT_JUNIPER_PPPOE   167
 

Definition at line 558 of file pcap-bpf.h.

#define DLT_JUNIPER_PPPOE_ATM   168
 

Definition at line 559 of file pcap-bpf.h.

#define DLT_JUNIPER_SERVICES   136
 

Definition at line 405 of file pcap-bpf.h.

#define DLT_LINUX_IRDA   144
 

Definition at line 454 of file pcap-bpf.h.

#define DLT_LINUX_LAPD   177
 

Definition at line 594 of file pcap-bpf.h.

#define DLT_LINUX_PPP_WITHDIRECTION   DLT_PPP_PPPD
 

Definition at line 550 of file pcap-bpf.h.

#define DLT_LINUX_SLL   113
 

Definition at line 277 of file pcap-bpf.h.

#define DLT_LOOP   108
 

Definition at line 254 of file pcap-bpf.h.

#define DLT_LTALK   114
 

Definition at line 282 of file pcap-bpf.h.

#define DLT_MTP2   140
 

Definition at line 430 of file pcap-bpf.h.

#define DLT_MTP2_WITH_PHDR   139
 

Definition at line 429 of file pcap-bpf.h.

#define DLT_MTP3   141
 

Definition at line 431 of file pcap-bpf.h.

#define DLT_NULL   0
 

Definition at line 129 of file pcap-bpf.h.

#define DLT_PCI_EXP   125
 

Definition at line 360 of file pcap-bpf.h.

#define DLT_PFLOG   117
 

Definition at line 304 of file pcap-bpf.h.

#define DLT_PPP   9
 

Definition at line 138 of file pcap-bpf.h.

#define DLT_PPP_BSDOS   16
 

Definition at line 171 of file pcap-bpf.h.

#define DLT_PPP_ETHER   51
 

Definition at line 194 of file pcap-bpf.h.

#define DLT_PPP_PPPD   166
 

Definition at line 543 of file pcap-bpf.h.

#define DLT_PPP_SERIAL   50
 

Definition at line 193 of file pcap-bpf.h.

#define DLT_PPP_WITH_DIRECTION   DLT_PPP_PPPD
 

Definition at line 549 of file pcap-bpf.h.

#define DLT_PRISM_HEADER   119
 

Definition at line 316 of file pcap-bpf.h.

#define DLT_PRONET   4
 

Definition at line 133 of file pcap-bpf.h.

#define DLT_RAW   12
 

Definition at line 155 of file pcap-bpf.h.

#define DLT_REDBACK_SMARTEDGE   32
 

Definition at line 186 of file pcap-bpf.h.

#define DLT_RIO   124
 

Definition at line 359 of file pcap-bpf.h.

#define DLT_SCCP   142
 

Definition at line 432 of file pcap-bpf.h.

#define DLT_SLIP   8
 

Definition at line 137 of file pcap-bpf.h.

#define DLT_SLIP_BSDOS   15
 

Definition at line 170 of file pcap-bpf.h.

#define DLT_SUNATM   123
 

Definition at line 353 of file pcap-bpf.h.

#define DLT_SYMANTEC_FIREWALL   99
 

Definition at line 203 of file pcap-bpf.h.

#define DLT_TZSP   128
 

Definition at line 378 of file pcap-bpf.h.

#define DLT_USER0   147
 

Definition at line 487 of file pcap-bpf.h.

#define DLT_USER1   148
 

Definition at line 488 of file pcap-bpf.h.

#define DLT_USER10   157
 

Definition at line 497 of file pcap-bpf.h.

#define DLT_USER11   158
 

Definition at line 498 of file pcap-bpf.h.

#define DLT_USER12   159
 

Definition at line 499 of file pcap-bpf.h.

#define DLT_USER13   160
 

Definition at line 500 of file pcap-bpf.h.

#define DLT_USER14   161
 

Definition at line 501 of file pcap-bpf.h.

#define DLT_USER15   162
 

Definition at line 502 of file pcap-bpf.h.

#define DLT_USER2   149
 

Definition at line 489 of file pcap-bpf.h.

#define DLT_USER3   150
 

Definition at line 490 of file pcap-bpf.h.

#define DLT_USER4   151
 

Definition at line 491 of file pcap-bpf.h.

#define DLT_USER5   152
 

Definition at line 492 of file pcap-bpf.h.

#define DLT_USER6   153
 

Definition at line 493 of file pcap-bpf.h.

#define DLT_USER7   154
 

Definition at line 494 of file pcap-bpf.h.

#define DLT_USER8   155
 

Definition at line 495 of file pcap-bpf.h.

#define DLT_USER9   156
 

Definition at line 496 of file pcap-bpf.h.


Typedef Documentation

typedef int bpf_int32
 

Definition at line 67 of file pcap-bpf.h.

typedef u_int bpf_u_int32
 

Definition at line 68 of file pcap-bpf.h.


Function Documentation

u_int bpf_filter  ) 
 

int bpf_validate  ) 
 


Generated on Sun May 14 14:51:29 2006 by  doxygen 1.4.2