net/: More clean-up of spacing/alignment issues

This commit is contained in:
Gregory Nutt
2015-10-08 15:10:04 -06:00
parent 1e6ffe7677
commit 6209c51206
48 changed files with 311 additions and 278 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ void arp_arpin(FAR struct net_driver_s *dev)
dev->d_len = 0;
ipaddr = net_ip4addr_conv32(arp->ah_dipaddr);
switch(arp->ah_opcode)
switch (arp->ah_opcode)
{
case HTONS(ARP_REQUEST):
nllvdbg("ARP request for IP %04lx\n", (long)ipaddr);
+1 -1
View File
@@ -86,7 +86,7 @@
void arp_dump(FAR struct arp_hdr_s *arp)
{
nlldbg(" HW type: %04x Protocol: %04x\n",
arp->ah_hwtype, arp->ah_protocol);\
arp->ah_hwtype, arp->ah_protocol);
nlldbg(" HW len: %02x Proto len: %02x Operation: %04x\n",
arp->ah_hwlen, arp->ah_protolen, arp->ah_opcode);
nlldbg(" Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n",
+15 -4
View File
@@ -73,8 +73,16 @@
/* Support for broadcast address */
static const struct ether_addr g_broadcast_ethaddr =
{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};
static const uint16_t g_broadcast_ipaddr[2] = {0xffff, 0xffff};
{
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
}
};
static const uint16_t g_broadcast_ipaddr[2] =
{
0xffff, 0xffff
};
/* Support for IGMP multicast addresses.
*
@@ -93,7 +101,10 @@ static const uint16_t g_broadcast_ipaddr[2] = {0xffff, 0xffff};
*/
#ifdef CONFIG_NET_IGMP
static const uint8_t g_multicast_ethaddr[3] = {0x01, 0x00, 0x5e};
static const uint8_t g_multicast_ethaddr[3] =
{
0x01, 0x00, 0x5e
};
#endif
/****************************************************************************
@@ -186,7 +197,7 @@ void arp_out(FAR struct net_driver_s *dev)
* last three bytes of the IP address.
*/
FAR const uint8_t *ip = ((uint8_t*)pip->eh_destipaddr) + 1;
FAR const uint8_t *ip = ((FAR uint8_t *)pip->eh_destipaddr) + 1;
memcpy(peth->dest, g_multicast_ethaddr, 3);
memcpy(&peth->dest[3], ip, 3);
}