mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
net: cosmetic: Un-typedef ICMP_t
Remove typedef and lower-case name Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
738853bb6d
commit
e0a630795b
3 changed files with 6 additions and 4 deletions
|
@ -298,7 +298,7 @@ struct arp_hdr {
|
||||||
/* Codes for NOT_REACH */
|
/* Codes for NOT_REACH */
|
||||||
#define ICMP_NOT_REACH_PORT 3 /* Port unreachable */
|
#define ICMP_NOT_REACH_PORT 3 /* Port unreachable */
|
||||||
|
|
||||||
typedef struct icmphdr {
|
struct icmp_hdr {
|
||||||
uchar type;
|
uchar type;
|
||||||
uchar code;
|
uchar code;
|
||||||
ushort checksum;
|
ushort checksum;
|
||||||
|
@ -314,8 +314,10 @@ typedef struct icmphdr {
|
||||||
} frag;
|
} frag;
|
||||||
uchar data[0];
|
uchar data[0];
|
||||||
} un;
|
} un;
|
||||||
} ICMP_t;
|
};
|
||||||
|
|
||||||
|
#define ICMP_HDR_SIZE (sizeof(struct icmp_hdr))
|
||||||
|
#define IP_ICMP_HDR_SIZE (IP_HDR_SIZE + ICMP_HDR_SIZE)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Maximum packet size; used to allocate packet storage.
|
* Maximum packet size; used to allocate packet storage.
|
||||||
|
|
|
@ -825,7 +825,7 @@ static inline struct ip_udp_hdr *NetDefragment(struct ip_udp_hdr *ip, int *lenp)
|
||||||
static void receive_icmp(struct ip_udp_hdr *ip, int len,
|
static void receive_icmp(struct ip_udp_hdr *ip, int len,
|
||||||
IPaddr_t src_ip, struct ethernet_hdr *et)
|
IPaddr_t src_ip, struct ethernet_hdr *et)
|
||||||
{
|
{
|
||||||
ICMP_t *icmph = (ICMP_t *)&ip->udp_src;
|
struct icmp_hdr *icmph = (struct icmp_hdr *)&ip->udp_src;
|
||||||
|
|
||||||
switch (icmph->type) {
|
switch (icmph->type) {
|
||||||
case ICMP_REDIRECT:
|
case ICMP_REDIRECT:
|
||||||
|
|
|
@ -100,7 +100,7 @@ void ping_start(void)
|
||||||
|
|
||||||
void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
|
void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
|
||||||
{
|
{
|
||||||
ICMP_t *icmph = (ICMP_t *)&(ip->udp_src);
|
struct icmp_hdr *icmph = (struct icmp_hdr *)&ip->udp_src;
|
||||||
IPaddr_t src_ip;
|
IPaddr_t src_ip;
|
||||||
|
|
||||||
switch (icmph->type) {
|
switch (icmph->type) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue