#include <asm/byteorder.h>
#include "bridge_ctl.h"
+#include "ctl_functions.h"
#include "netif_utils.h"
#include "packet.h"
#include "log.h"
}
}
-static void help()
+static void help(void)
{
printf("Usage: mstpctl [commands]\n");
printf("commands:\n");
/* 13.26.6.NOTE: A Configuration BPDU implicitly conveys a
* Designated Port Role */
roleIsDesignated = true;
- assign(mPri->IntRootPathCost, 0u);
+ assign(mPri->IntRootPathCost, __constant_cpu_to_be32(0));
assign(mPri->DesignatedBridgeID, b->cistRRootID);
/* messageTimes.remainingHops */
assign(mTimes->remainingHops, prt->bridge->MaxHops);
#include "log.h"
-int netsock = -1;
+static int netsock = -1;
int netsock_init(void)
{
#include <netinet/in.h>
#include <linux/if_packet.h>
#include <linux/filter.h>
+#include <asm/byteorder.h>
#include "epoll_loop.h"
#include "netif_utils.h"
struct sockaddr_ll sl =
{
.sll_family = AF_PACKET,
- .sll_protocol = htons(ETH_P_802_2),
+ .sll_protocol = __constant_cpu_to_be16(ETH_P_802_2),
.sll_ifindex = ifindex,
.sll_halen = ETH_ALEN,
};