summaryrefslogtreecommitdiff
path: root/net/link_local.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-04-08 01:41:04 -0500
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:32 -0600
commit0adb5b761f4c789ae47d8abb015f5e017263d3f2 (patch)
tree84f951f300ae9d8d0a48c9ab14f11c9c1ecef477 /net/link_local.c
parent586cbe51ab8ef357bcf3a52c6885ab00bc7293dd (diff)
net: cosmetic: Name ethaddr variables consistently
Use "_ethaddr" at the end of variables and drop CamelCase. Make constant values actually 'const'. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/link_local.c')
-rw-r--r--net/link_local.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/net/link_local.c b/net/link_local.c
index 6d92c555fb..2bca7de12a 100644
--- a/net/link_local.c
+++ b/net/link_local.c
@@ -139,7 +139,7 @@ static void link_local_timeout(void)
nprobes++;
debug_cond(DEBUG_LL_STATE, "probe/%u %s@%pI4\n",
nprobes, eth_get_name(), &ip);
- arp_raw_request(zero_ip, NetEtherNullAddr, ip);
+ arp_raw_request(zero_ip, net_null_ethaddr, ip);
timeout_ms = PROBE_MIN * 1000;
timeout_ms += random_delay_ms(PROBE_MAX - PROBE_MIN);
} else {
@@ -148,7 +148,7 @@ static void link_local_timeout(void)
nclaims = 0;
debug_cond(DEBUG_LL_STATE, "announce/%u %s@%pI4\n",
nclaims, eth_get_name(), &ip);
- arp_raw_request(ip, NetOurEther, ip);
+ arp_raw_request(ip, net_ethaddr, ip);
timeout_ms = ANNOUNCE_INTERVAL * 1000;
}
break;
@@ -160,7 +160,7 @@ static void link_local_timeout(void)
nclaims = 0;
debug_cond(DEBUG_LL_STATE, "announce/%u %s@%pI4\n",
nclaims, eth_get_name(), &ip);
- arp_raw_request(ip, NetOurEther, ip);
+ arp_raw_request(ip, net_ethaddr, ip);
timeout_ms = ANNOUNCE_INTERVAL * 1000;
break;
case ANNOUNCE:
@@ -171,7 +171,7 @@ static void link_local_timeout(void)
nclaims++;
debug_cond(DEBUG_LL_STATE, "announce/%u %s@%pI4\n",
nclaims, eth_get_name(), &ip);
- arp_raw_request(ip, NetOurEther, ip);
+ arp_raw_request(ip, net_ethaddr, ip);
timeout_ms = ANNOUNCE_INTERVAL * 1000;
} else {
/* Switch to monitor state */
@@ -268,11 +268,9 @@ void link_local_receive_arp(struct arp_hdr *arp, int len)
source_ip_conflict = 0;
target_ip_conflict = 0;
- if (memcmp(&arp->ar_spa, &ip, ARP_PLEN) == 0
- && memcmp(&arp->ar_sha, NetOurEther, ARP_HLEN) != 0
- ) {
+ if (memcmp(&arp->ar_spa, &ip, ARP_PLEN) == 0 &&
+ memcmp(&arp->ar_sha, net_ethaddr, ARP_HLEN) != 0)
source_ip_conflict = 1;
- }
/*
* According to RFC 3927, section 2.2.1:
@@ -284,7 +282,7 @@ void link_local_receive_arp(struct arp_hdr *arp, int len)
if (arp->ar_op == htons(ARPOP_REQUEST) &&
memcmp(&arp->ar_spa, &null_ip, ARP_PLEN) == 0 &&
memcmp(&arp->ar_tpa, &ip, ARP_PLEN) == 0 &&
- memcmp(&arp->ar_sha, NetOurEther, ARP_HLEN) != 0) {
+ memcmp(&arp->ar_sha, net_ethaddr, ARP_HLEN) != 0) {
target_ip_conflict = 1;
}
@@ -318,7 +316,7 @@ void link_local_receive_arp(struct arp_hdr *arp, int len)
debug("monitor conflict -- defending\n");
state = DEFEND;
timeout_ms = DEFEND_INTERVAL * 1000;
- arp_raw_request(ip, NetOurEther, ip);
+ arp_raw_request(ip, net_ethaddr, ip);
}
break;
case DEFEND: