Skip to content

Commit 9272642

Browse files
authored
Changing the naming to match the one from Linux
1 parent 1ef6ac8 commit 9272642

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

include/net/ipheaders.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
//
99
typedef struct ip_hdr
1010
{
11-
unsigned char version; // 4-bit IPv4 version
11+
unsigned char ip_v; // 4-bit IPv4 version
1212
// 4-bit header length (in 32-bit words)
1313
unsigned char ip_tos; // IP type of service
14-
unsigned short tot_len; // Total length
15-
unsigned short id; // Unique identifier
16-
unsigned short ihl; // Fragment offset field
17-
unsigned char ttl; // Time to live
18-
unsigned char protocol; // Protocol(TCP,UDP etc)
19-
unsigned short check; // IP checksum
20-
unsigned int saddr; // Source address
21-
unsigned int daddr; // Source address
14+
unsigned short ip_len; // Total length
15+
unsigned short ip_id; // Unique identifier
16+
unsigned short ip_hl; // Fragment offset field
17+
unsigned char ip_ttl; // Time to live
18+
unsigned char ip_p; // Protocol(TCP,UDP etc)
19+
unsigned short ip_sum; // IP checksum
20+
unsigned int ip_src; // Source address
21+
unsigned int ip_dst; // Source address
2222
} IPV4_HDR, * PIPV4_HDR, FAR* LPIPV4_HDR, iphdr;
2323

2424
//
@@ -52,10 +52,10 @@ typedef struct ipv6_fragment_hdr
5252
//
5353
typedef struct udp_hdr
5454
{
55-
unsigned short source; // Source port no.
56-
unsigned short dest; // Dest. port no.
57-
unsigned short len; // Udp packet length
58-
unsigned short check; // Udp checksum
55+
unsigned short uh_sport; // Source port no.
56+
unsigned short uh_dport; // Dest. port no.
57+
unsigned short uh_ulen; // Udp packet length
58+
unsigned short uh_sum; // Udp checksum
5959
} UDP_HDR, * PUDP_HDR, udphdr;
6060

6161
//

0 commit comments

Comments
 (0)