module_dns_mx.h 956 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * ZMap Copyright 2013 Regents of the University of Michigan
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy
  6. * of the License at http://www.apache.org/licenses/LICENSE-2.0
  7. */
  8. #include <stdlib.h>
  9. #include <stdio.h>
  10. #include <stdint.h>
  11. #include <unistd.h>
  12. #include <string.h>
  13. #include <sys/types.h>
  14. #include <sys/socket.h>
  15. #include <netdb.h>
  16. struct dnshdr {
  17. char* dns_msg_header;
  18. char* dns_msg_name;
  19. char* dns_msg_tail;
  20. char* dns_msg_additional;
  21. };
  22. int dnshdr_default(struct dnshdr *passed_in, unsigned long src_ip);
  23. void dns_print_packet(FILE *fp, void* packet);
  24. int dns_make_packet(void *buf, ipaddr_n_t src_ip, ipaddr_n_t dst_ip,
  25. uint32_t *validation, int probe_num, void *arg);
  26. int dns_validate_packet(const struct ip *ip_hdr, uint32_t len,
  27. __attribute__((unused))uint32_t *src_ip, uint32_t *validation);