BlinkenArea - GitList
Repositories
Blog
Wiki
mips_sys
Code
Commits
Branches
Tags
Search
Tree:
2a4b80d
Branches
Tags
master
mips_sys
fw
icmp.h
handle padding to minimum ethernet frame size (TX) in HW
Stefan Schuermans
commited
2a4b80d
at 2012-03-24 16:42:53
icmp.h
Blame
History
Raw
#ifndef ICMP_H #define ICMP_H #include "ethernet.h" #include "ip.h" /// header of ICMP packet struct icmp_header { unsigned char type; unsigned char code; unsigned short chk; } __attribute__((packed)); /// ICMP packet struct icmp_packet { struct ethernet_header eth_hdr; struct ip_header ip_hdr; struct icmp_header icmp_hdr; } __attribute__((packed)); // header of ICMP echo request/reply packet struct icmp_echo_header { unsigned short id; unsigned short seq; } __attribute__((packed)); /// ICMP echo request/reply packet struct icmp_echo_packet { struct ethernet_header eth_hdr; struct ip_header ip_hdr; struct icmp_header icmp_hdr; struct icmp_echo_header echo_hdr; } __attribute__((packed)); /** * @brief process a received ICMP packet * @param[in] ptr pointer to data of packet * @param[in] sz size of packet */ void icmp_recv(void *ptr, unsigned int sz); #endif // #ifdef ICMP_H