summaryrefslogtreecommitdiff
path: root/common/include/decode_tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/include/decode_tcp.h')
-rw-r--r--common/include/decode_tcp.h46
1 files changed, 0 insertions, 46 deletions
diff --git a/common/include/decode_tcp.h b/common/include/decode_tcp.h
deleted file mode 100644
index 26197ac..0000000
--- a/common/include/decode_tcp.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef _DECODE_TCP_H
-#define _DECODE_TCP_H
-
-#ifdef __cpluscplus
-extern "C"
-{
-#endif
-
-#include "public.h"
-
-#define TCP_HEADER_LEN 20
-
- typedef struct tcp_header_s
- {
- uint16_t th_sport; /**< source port */
- uint16_t th_dport; /**< destination port */
- uint32_t th_seq; /**< sequence number */
- uint32_t th_ack; /**< acknowledgement number */
- uint8_t th_offx2; /**< offset and reserved */
- uint8_t th_flags; /**< pkt flags */
- uint16_t th_win; /**< pkt window */
- uint16_t th_sum; /**< checksum */
- uint16_t th_urp; /**< urgent pointer */
- } __attribute__((__packed__)) tcp_header_t;
-
- typedef struct tcp_info_s
- {
- uint16_t src_port;
- uint16_t dst_port;
-
- tcp_header_t *hdr;
- uint8_t *payload;
-
- uint32_t opt_len;
- uint32_t hdr_len;
- uint32_t payload_len;
- } tcp_info_t;
-
- int decode_tcp(tcp_info_t *packet, const uint8_t *data, uint32_t len);
- int dump_tcp_info(tcp_info_t *packet, char *buff, size_t size);
-
-#ifdef __cpluscplus
-}
-#endif
-
-#endif \ No newline at end of file