From 2ea838acb2401df9e31074a1d1e78bf9bf739387 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Thu, 7 Jun 2012 18:24:29 -0700 Subject: [PATCH] packets: Rename compose_benign_packet(). The name compose_rarp() more clearly describes what it's doing now. Requested-by: Justin Pettit Signed-off-by: Ethan Jackson --- lib/bond.c | 2 +- lib/packets.c | 2 +- lib/packets.h | 3 +-- ofproto/fail-open.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/bond.c b/lib/bond.c index 8b32bdf9..54f2d0e0 100644 --- a/lib/bond.c +++ b/lib/bond.c @@ -531,7 +531,7 @@ bond_compose_learning_packet(struct bond *bond, slave = choose_output_slave(bond, &flow, vlan); packet = ofpbuf_new(0); - compose_benign_packet(packet, eth_src); + compose_rarp(packet, eth_src); if (vlan) { eth_push_vlan(packet, htons(vlan)); } diff --git a/lib/packets.c b/lib/packets.c index 9b61d047..bbf49344 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -127,7 +127,7 @@ eth_addr_from_string(const char *s, uint8_t ea[ETH_ADDR_LEN]) * The returned packet has enough headroom to insert an 802.1Q VLAN header if * desired. */ void -compose_benign_packet(struct ofpbuf *b, const uint8_t eth_src[ETH_ADDR_LEN]) +compose_rarp(struct ofpbuf *b, const uint8_t eth_src[ETH_ADDR_LEN]) { struct eth_header *eth; struct rarp_header *rarp; diff --git a/lib/packets.h b/lib/packets.h index c1d404d4..8e4117e8 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -135,8 +135,7 @@ static inline void eth_addr_nicira_random(uint8_t ea[ETH_ADDR_LEN]) bool eth_addr_is_reserved(const uint8_t ea[ETH_ADDR_LEN]); bool eth_addr_from_string(const char *, uint8_t ea[ETH_ADDR_LEN]); -void compose_benign_packet(struct ofpbuf *, - const uint8_t eth_src[ETH_ADDR_LEN]); +void compose_rarp(struct ofpbuf *, const uint8_t eth_src[ETH_ADDR_LEN]); void eth_push_vlan(struct ofpbuf *, ovs_be16 tci); void eth_pop_vlan(struct ofpbuf *); diff --git a/ofproto/fail-open.c b/ofproto/fail-open.c index f3a99c13..912dc4e4 100644 --- a/ofproto/fail-open.c +++ b/ofproto/fail-open.c @@ -121,7 +121,7 @@ send_bogus_packet_ins(struct fail_open *fo) ofpbuf_init(&b, 128); eth_addr_nicira_random(mac); - compose_benign_packet(&b, mac); + compose_rarp(&b, mac); memset(&pin, 0, sizeof pin); pin.packet = b.data; -- 2.30.2