Last active
August 11, 2016 05:58
-
-
Save jozadaquebatista/a3f36dbfcd3fc4cfef01ac33858e4e1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* [ TCP header ] | |
============ */ | |
struct set { | |
uint8_t data_offset:(1<<2); | |
uint8_t reserved:(3<<1); | |
_Bool urg; | |
_Bool ack; | |
_Bool psh; | |
_Bool rst; | |
_Bool syn; | |
_Bool fin; | |
uint16_t window_s; | |
}; | |
struct tcp_H { | |
uint16_t src_number; | |
uint16_t dst_number; | |
uint32_t seq_number; | |
uint32_t ack_number; | |
struct set setup; | |
char chk_sum[0xf]; | |
char urgent_pointer[0xf]; | |
uint8_t options:((1<<5)-(1<<3)); | |
uint8_t padding; | |
char data[1<<5]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment