udpcksum.h 824 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "unp.h"
  2. #include <pcap.h>
  3. #include <netinet/in_systm.h> /* required for ip.h */
  4. #include <netinet/in.h>
  5. #include <netinet/ip.h>
  6. #include <netinet/ip_var.h>
  7. #include <netinet/udp.h>
  8. #include <netinet/udp_var.h>
  9. #include <net/if.h>
  10. #include <netinet/if_ether.h>
  11. #define TTL_OUT 64 /* outgoing TTL */
  12. /* declare global variables */
  13. extern struct sockaddr *dest, *local;
  14. extern socklen_t destlen, locallen;
  15. extern int datalink;
  16. extern char *device;
  17. extern pcap_t *pd;
  18. extern int rawfd;
  19. extern int snaplen;
  20. extern int verbose;
  21. extern int zerosum;
  22. /* function prototypes */
  23. void cleanup(int);
  24. char *next_pcap(int *);
  25. void open_output(void);
  26. void open_pcap(void);
  27. void send_dns_query(void);
  28. void test_udp(void);
  29. void udp_write(char *, int);
  30. struct udpiphdr *udp_read(void);