/* * ZMap Copyright 2013 Regents of the University of Michigan * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 */ #include "../state.h" #include "../fieldset.h" #ifndef MODULE_NTP_H #define MODULE_NTP_H #include #include #include #include #include struct __attribute__((__packed__)) ntphdr{//typedef uint8_t LI_VN_MODE; uint8_t stratum; uint8_t poll; uint8_t precision; uint32_t root_delay; uint32_t root_dispersion; uint32_t ref_ID; uint64_t reference_timestamp; uint64_t origin_timestamp; uint64_t receive_timestamp; uint64_t transmit_timestamp; //uint32_t key_ID; //uint64_t dgst_1; //uint64_t dgst_2; }; void ntp_process_packet(const u_char *packet, __attribute__((unused)) uint32_t len, fieldset_t *fs); int ntp_init_perthread(void *buf, macaddr_t *src, macaddr_t *gw, __attribute__((unused)) port_h_t dst_port, void **arg); void ntp_print_packet (FILE *fp, void *packet); #endif