]> git.ipfire.org Git - people/ms/rstp.git/blobdiff - brstate.c
Merge remote-tracking branch 'upstream/master'
[people/ms/rstp.git] / brstate.c
index 171c59d5dd674f985b2a18dfaa9489d95291f38a..1fe792e336f6a2637e88cf90839e6a856c3cebc5 100644 (file)
--- a/brstate.c
+++ b/brstate.c
@@ -47,28 +47,6 @@ static int br_set_state(struct rtnl_handle *rth, unsigned ifindex, __u8 state)
        return rtnl_talk(rth, &req.n, 0, 0, NULL, NULL, NULL);
 }
 
-static int br_send_bpdu(struct rtnl_handle *rth, unsigned ifindex,
-                       const unsigned char *data, int len)
-{
-       struct {
-               struct nlmsghdr n;
-               struct ifinfomsg ifi;
-               char buf[256];
-       } req;
-
-       memset(&req, 0, sizeof(req));
-
-       req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
-       req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_REPLACE;
-       req.n.nlmsg_type = RTM_SETLINK;
-       req.ifi.ifi_family = AF_BRIDGE;
-       req.ifi.ifi_index = ifindex;
-
-       addattr_l(&req.n, sizeof(req.buf), IFLA_PRIORITY, data, len);
-
-       return rtnl_talk(rth, &req.n, 0, 0, NULL, NULL, NULL);
-}
-
 #include "bridge_ctl.h"
 
 extern struct rtnl_handle rth_state;
@@ -84,13 +62,3 @@ int bridge_set_state(int ifindex, int brstate)
        }
        return 0;
 }
-
-int bridge_send_bpdu(int ifindex, const unsigned char *data, int len)
-{
-       int err = br_send_bpdu(&rth_state, ifindex, data, len);
-       if (err < 0) {
-               fprintf(stderr, "Couldn't send bpdu, ifindex %d\n", ifindex);
-               return -1;
-       }
-       return 0;
-}