mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-09 03:58:18 -04:00
net: cosmetic: Un-typedef ARP_t
Remove typedef and lower-case letters Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
c68cca35b3
commit
738853bb6d
@ -254,8 +254,7 @@ struct ip_udp_hdr {
|
|||||||
/*
|
/*
|
||||||
* Address Resolution Protocol (ARP) header.
|
* Address Resolution Protocol (ARP) header.
|
||||||
*/
|
*/
|
||||||
typedef struct
|
struct arp_hdr {
|
||||||
{
|
|
||||||
ushort ar_hrd; /* Format of hardware address */
|
ushort ar_hrd; /* Format of hardware address */
|
||||||
# define ARP_ETHER 1 /* Ethernet hardware address */
|
# define ARP_ETHER 1 /* Ethernet hardware address */
|
||||||
ushort ar_pro; /* Format of protocol address */
|
ushort ar_pro; /* Format of protocol address */
|
||||||
@ -280,7 +279,7 @@ typedef struct
|
|||||||
uchar ar_tha[]; /* Target hardware address */
|
uchar ar_tha[]; /* Target hardware address */
|
||||||
uchar ar_tpa[]; /* Target protocol address */
|
uchar ar_tpa[]; /* Target protocol address */
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
} ARP_t;
|
};
|
||||||
|
|
||||||
#define ARP_HDR_SIZE (8+20) /* Size assuming ethernet */
|
#define ARP_HDR_SIZE (8+20) /* Size assuming ethernet */
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ void ArpInit(void)
|
|||||||
void ArpRequest(void)
|
void ArpRequest(void)
|
||||||
{
|
{
|
||||||
uchar *pkt;
|
uchar *pkt;
|
||||||
ARP_t *arp;
|
struct arp_hdr *arp;
|
||||||
|
|
||||||
debug("ARP broadcast %d\n", NetArpWaitTry);
|
debug("ARP broadcast %d\n", NetArpWaitTry);
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ void ArpRequest(void)
|
|||||||
|
|
||||||
pkt += NetSetEther(pkt, NetBcastAddr, PROT_ARP);
|
pkt += NetSetEther(pkt, NetBcastAddr, PROT_ARP);
|
||||||
|
|
||||||
arp = (ARP_t *) pkt;
|
arp = (struct arp_hdr *) pkt;
|
||||||
|
|
||||||
arp->ar_hrd = htons(ARP_ETHER);
|
arp->ar_hrd = htons(ARP_ETHER);
|
||||||
arp->ar_pro = htons(PROT_IP);
|
arp->ar_pro = htons(PROT_IP);
|
||||||
@ -115,7 +115,7 @@ void ArpTimeoutCheck(void)
|
|||||||
|
|
||||||
void ArpReceive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
|
void ArpReceive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
|
||||||
{
|
{
|
||||||
ARP_t *arp;
|
struct arp_hdr *arp;
|
||||||
IPaddr_t tmp;
|
IPaddr_t tmp;
|
||||||
uchar *pkt;
|
uchar *pkt;
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ void ArpReceive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
|
|||||||
*/
|
*/
|
||||||
debug("Got ARP\n");
|
debug("Got ARP\n");
|
||||||
|
|
||||||
arp = (ARP_t *)ip;
|
arp = (struct arp_hdr *)ip;
|
||||||
if (len < ARP_HDR_SIZE) {
|
if (len < ARP_HDR_SIZE) {
|
||||||
printf("bad length %d < %d\n", len, ARP_HDR_SIZE);
|
printf("bad length %d < %d\n", len, ARP_HDR_SIZE);
|
||||||
return;
|
return;
|
||||||
|
@ -43,10 +43,10 @@ int RarpTry;
|
|||||||
*/
|
*/
|
||||||
void rarp_receive(struct ip_udp_hdr *ip, unsigned len)
|
void rarp_receive(struct ip_udp_hdr *ip, unsigned len)
|
||||||
{
|
{
|
||||||
ARP_t *arp;
|
struct arp_hdr *arp;
|
||||||
|
|
||||||
debug("Got RARP\n");
|
debug("Got RARP\n");
|
||||||
arp = (ARP_t *)ip;
|
arp = (struct arp_hdr *)ip;
|
||||||
if (len < ARP_HDR_SIZE) {
|
if (len < ARP_HDR_SIZE) {
|
||||||
printf("bad length %d < %d\n", len, ARP_HDR_SIZE);
|
printf("bad length %d < %d\n", len, ARP_HDR_SIZE);
|
||||||
return;
|
return;
|
||||||
@ -87,14 +87,14 @@ static void RarpTimeout(void)
|
|||||||
void RarpRequest(void)
|
void RarpRequest(void)
|
||||||
{
|
{
|
||||||
uchar *pkt;
|
uchar *pkt;
|
||||||
ARP_t *rarp;
|
struct arp_hdr *rarp;
|
||||||
|
|
||||||
printf("RARP broadcast %d\n", ++RarpTry);
|
printf("RARP broadcast %d\n", ++RarpTry);
|
||||||
pkt = NetTxPacket;
|
pkt = NetTxPacket;
|
||||||
|
|
||||||
pkt += NetSetEther(pkt, NetBcastAddr, PROT_RARP);
|
pkt += NetSetEther(pkt, NetBcastAddr, PROT_RARP);
|
||||||
|
|
||||||
rarp = (ARP_t *)pkt;
|
rarp = (struct arp_hdr *)pkt;
|
||||||
|
|
||||||
rarp->ar_hrd = htons(ARP_ETHER);
|
rarp->ar_hrd = htons(ARP_ETHER);
|
||||||
rarp->ar_pro = htons(PROT_IP);
|
rarp->ar_pro = htons(PROT_IP);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user