home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume27 / bootptest-1.1 / part01 / interface.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-11  |  845 b   |  38 lines

  1. /* interface.h */
  2.  
  3. /*
  4.  * This is quite unusual, but allows bootptest to borrow print-bootp.c
  5.  * from the tcpdump program without any changes whatsoever.
  6.  *
  7.  * This has been tested on SunOS 4.1.3 only.
  8.  */
  9.  
  10. #ifndef NTOHL
  11. #define NTOHL(x) x=ntohl(x)
  12. #define NTOHS(x) x=ntohs(x)
  13. #define HTONL(x) x=htonl(x)
  14. #define HTONS(x) x=htons(x)
  15. #endif
  16.  
  17. #define inline /*sorry*/
  18.  
  19. #define getname(p) inet_ntoa(p)
  20. #define etheraddr_string(p) ether_ntoa(p)
  21.  
  22. /* We do not really have both Ethernet addresses. */
  23. #define ESRC(p) (p)
  24. #define EDST(p) (p)
  25.  
  26. extern int vflag, tflag;
  27. extern int thiszone;
  28.  
  29. extern char *program_name; /* used to generate self-identifying messages */
  30.  
  31. extern int snaplen;
  32.  
  33. /* global pointers to beginning and end of current packet (during printing) */
  34. extern unsigned char *packetp;
  35. extern unsigned char *snapend;
  36.  
  37. extern char *malloc();
  38.