Thread (8 messages) 8 messages, 3 authors, 2019-10-01

Re: [PATCH iproute2 net-next v2 1/2] bridge: fdb get support

From: David Ahern <hidden>
Date: 2019-09-30 16:41:49

On 9/28/19 2:22 PM, Roopa Prabhu wrote:
quoted hunk ↗ jump to hunk
@@ -518,6 +520,113 @@ static int fdb_modify(int cmd, int flags, int argc, char **argv)
 	return 0;
 }
 
+static int fdb_get(int argc, char **argv)
+{
+	struct {
+		struct nlmsghdr	n;
+		struct ndmsg		ndm;
+		char			buf[1024];
+	} req = {
+		.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg)),
+		.n.nlmsg_flags = NLM_F_REQUEST,
+		.n.nlmsg_type = RTM_GETNEIGH,
+		.ndm.ndm_family = AF_BRIDGE,
+	};
+	struct nlmsghdr *answer;
+	char *addr = NULL;
+	char  *d = NULL, *br = NULL;
+	char abuf[ETH_ALEN];
+	unsigned long vni = ~0;
+	int br_ifindex = 0;
+	char *endptr;
+	short vlan = -1;
iproute2 follows the net standards of reverse xmas tree for declarations.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help