summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorAmeya Dharkar <adharkar@vmware.com>2019-05-16 17:29:08 -0700
committerAmeya Dharkar <adharkar@vmware.com>2019-06-17 12:05:38 -0700
commit9da60d0a19b1a838865e37e6554481dc851c1bcb (patch)
tree4d5560f35499c1396839040fa4dead6da3c82d26 /lib/if.c
parentfbe748e59fdff41a0ae8a07c42041bcfecb39f92 (diff)
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 'lib/if.c')
0 files changed, 0 insertions, 0 deletions