"Fossies" - the Fresh Open Source Software Archive

Member "scanlogd-2.2.8/in.h" (10 Mar 2021, 683 Bytes) of package /linux/misc/scanlogd-2.2.8.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "in.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.2.7_vs_2.2.8.

    1 /*
    2  * Generic packet capture interface for scanlogd.
    3  */
    4 
    5 #ifndef _SCANLOGD_IN_H
    6 #define _SCANLOGD_IN_H
    7 
    8 #include <netinet/in_systm.h>
    9 #include <netinet/in.h>
   10 #include <netinet/ip.h>
   11 #include <netinet/tcp.h>
   12 
   13 #ifndef IP_MF
   14 #define IP_MF               0x2000
   15 #endif
   16 #ifndef IP_OFFMASK
   17 #define IP_OFFMASK          0x1fff
   18 #endif
   19 
   20 /*
   21  * Packet header as read from a packet capture interface.  In reality, the
   22  * TCP header can be at a different offset; this is just to get the total
   23  * size right.
   24  */
   25 struct header {
   26     struct ip ip;
   27     struct tcphdr tcp;
   28     char space[60 - sizeof(struct ip)];
   29 };
   30 
   31 extern int in_init(void);
   32 extern void in_run(void (*process_packet)(struct header *packet, int size));
   33 
   34 #endif