Skip to content

Commit

Permalink
{Ethernet, IP, ICMP, UDP, TCP} headers
Browse files Browse the repository at this point in the history
  • Loading branch information
adamalston committed Jul 4, 2020
1 parent 8920200 commit e2039ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions header.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ struct ipheader
// ICMP Header
struct icmpheader
{
unsigned char icmp_type; // ICMP message type
unsigned char icmp_code; // Error code
unsigned char icmp_type; // ICMP message type
unsigned char icmp_code; // Error code
unsigned short int icmp_chksum; // Checksum for ICMP Header and data
unsigned short int icmp_id; // Used for identifying request
unsigned short int icmp_seq; // Sequence number
unsigned short int icmp_id; // Used for identifying request
unsigned short int icmp_seq; // Sequence number
};

// UDP Header
struct udpheader
{
u_int16_t udp_sport; // source port
u_int16_t udp_dport; // destination port
u_int16_t udp_ulen; // udp length
u_int16_t udp_sum; // udp checksum
u_int16_t udp_ulen; // udp length
u_int16_t udp_sum; // udp checksum
};

// TCP Header
Expand Down

0 comments on commit e2039ea

Please sign in to comment.