"Fossies" - the Fresh Open Source Software Archive

Member "isic-0.07/isic.h" (16 Dec 2006, 735 Bytes) of package /linux/privat/old/isic-0.07.tgz:


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 "isic.h" see the Fossies "Dox" file reference documentation.

    1 #include <strings.h>
    2 
    3 #ifndef __FAVOR_BSD
    4 # define __FAVOR_BSD
    5 #endif
    6 
    7 #include <libnet.h>
    8 
    9 #include <netinet/ip_icmp.h>
   10 #include <netinet/icmp6.h>
   11 #include <netinet/ip6.h>
   12 #include <netinet/if_ether.h>
   13 
   14 #ifndef ETHER_FRAME_SIZE
   15 #define ETHER_FRAME_SIZE 1500
   16 #endif
   17 
   18 #define IP_H      20
   19 #define UDP_H     8
   20 #define IP6_H     40
   21 #define IP6_FRAGH 8
   22 #define ICMP6_H   8
   23 
   24 /* We want a random function that returns 0 to 0x7fff */
   25 #if ( RAND_MAX != 2147483647 )  /* expect signed long */
   26 #error Random IP generation broken: unexpected RAND_MAX.
   27 #endif
   28 
   29 #define RAND8  ((u_int8_t)(rand() & 0xff))
   30 #define RAND16 ((u_int16_t)(rand() & 0xffff))
   31 #define RAND32 ((u_int32_t)((RAND16 << 16) + RAND16))
   32 
   33 void usage(char *);
   34 void sighandler(int);