summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_fpm_private.h
diff options
context:
space:
mode:
authorAmeya Dharkar <adharkar@vmware.com>2019-05-17 02:29:08 +0200
committerAmeya Dharkar <adharkar@vmware.com>2019-06-17 21:05:38 +0200
commit9da60d0a19b1a838865e37e6554481dc851c1bcb (patch)
tree4d5560f35499c1396839040fa4dead6da3c82d26 /zebra/zebra_fpm_private.h
parentZebra: Handle FPM connection up/down events (diff)
downloadfrr-9da60d0a19b1a838865e37e6554481dc851c1bcb.tar.xz
frr-9da60d0a19b1a838865e37e6554481dc851c1bcb.zip
Zebra: Build nelink message for RMAC updates
- Function "zfpm_netlink_encode_mac()" builds a netlink message for RMAC updates. - To build a netlink message for RMAC updates, we use "ndmsg" in rtlink. - FPM Message structure is: FPM header -> nlmsg header -> ndmsg fields -> ndmsg attributes - Netlink message will look like: {'ndm_type': 0, 'family': 7, '__pad': (), 'header': {'flags': 1281, 'length':64, 'type': 28, 'pid': 0, 'sequence_number': 0}, 'state': 2, 'flags': 22, 'attrs': [('NDA_LLADDR', 'b2:66:eb:b9:5b:d3'), ('NDA_DST', '10.100.0.2'), ('NDA_MASTER', 11), ('NDA_VNI', 1000)], 'ifindex': 18} - Message details: nlmsghdr.nlmsg_type = RTM_NEWNEIGH(28) or RTM_DELNEIGH(29) nlmsghdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE for "add" , "NLM_F_REQUEST" for delete. ndmsg.ndm_family = AF_BRIDGE ndmsg.ndm_ifindex = vxlan_if (ifindex) ndmsg.ndm_state = NUD_REACHABLE ndmsg.ndm_flags |= NTF_SELF | NTF_MASTER | NTF_EXT_LEARNED Attribute "NDA_LLADDR" for MAC address Attribute "NDA_DST" for remote vtep ip Attribute "NDA_MASTER" for bridge interface ifindex. Attribute "NDA_VNI" for VNI id. Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
Diffstat (limited to 'zebra/zebra_fpm_private.h')
-rw-r--r--zebra/zebra_fpm_private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_fpm_private.h b/zebra/zebra_fpm_private.h
index 3ca39c45a..c169ee8c2 100644
--- a/zebra/zebra_fpm_private.h
+++ b/zebra/zebra_fpm_private.h
@@ -92,6 +92,9 @@ extern int zfpm_netlink_encode_route(int cmd, rib_dest_t *dest,
extern int zfpm_protobuf_encode_route(rib_dest_t *dest, struct route_entry *re,
uint8_t *in_buf, size_t in_buf_len);
+extern int zfpm_netlink_encode_mac(struct fpm_mac_info_t *mac, char *in_buf,
+ size_t in_buf_len);
+
extern struct route_entry *zfpm_route_for_update(rib_dest_t *dest);
#ifdef __cplusplus