summaryrefslogtreecommitdiff
path: root/src/network/networkd-neighbor.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-07-11 02:23:41 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-07-11 22:22:29 +0900
commitb956364db01264199ff910e994e651730341911e (patch)
tree17ea18a8a7a62ebab83ecf183738fdd859914801 /src/network/networkd-neighbor.h
parent49808e0e2d01fd77df2e748de19cb402eb176bb9 (diff)
downloadsystemd-b956364db01264199ff910e994e651730341911e.tar.gz
network: rename Neighbor.MACAddress= to Neighbor.LinkLayerAddress=
And make it support IPv4 address. Closes #13015.
Diffstat (limited to 'src/network/networkd-neighbor.h')
-rw-r--r--src/network/networkd-neighbor.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/network/networkd-neighbor.h b/src/network/networkd-neighbor.h
index f591f0b03f..59cd82ac11 100644
--- a/src/network/networkd-neighbor.h
+++ b/src/network/networkd-neighbor.h
@@ -15,6 +15,13 @@ typedef struct Neighbor Neighbor;
#include "networkd-network.h"
#include "networkd-util.h"
+typedef enum {
+ NEIGHBOR_LLADDR_MAC,
+ NEIGHBOR_LLADDR_IP,
+ _NEIGHBOR_LLADDR_MAX,
+ _NEIGHBOR_LLADDR_INVALID = -1,
+} NeighborLLAddressType;
+
struct Neighbor {
Network *network;
Link *link;
@@ -22,8 +29,11 @@ struct Neighbor {
int family;
union in_addr_union in_addr;
- bool mac_configured;
- struct ether_addr mac;
+ union {
+ struct ether_addr mac;
+ union in_addr_union ip;
+ } lladdr;
+ NeighborLLAddressType lladdr_type;
LIST_FIELDS(Neighbor, neighbors);
};
@@ -36,3 +46,4 @@ int neighbor_configure(Neighbor *neighbor, Link *link, link_netlink_message_hand
CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_address);
CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_hwaddr);
+CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_lladdr);