const char *cmd;
int (*func)(int argc, char **argv);
} cmds[] = {
- { "address", do_ipaddr },
+ { "address", do_ipaddr },
{ "addrlabel", do_ipaddrlabel },
{ "maddress", do_multiaddr },
{ "route", do_iproute },
static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
{
struct {
- struct nlmsghdr n;
- struct ifaddrmsg ifa;
- char buf[256];
+ struct nlmsghdr n;
+ struct ifaddrmsg ifa;
+ char buf[256];
} req;
char *d = NULL;
char *l = NULL;
static int ipaddrlabel_modify(int cmd, int argc, char **argv)
{
struct {
- struct nlmsghdr n;
+ struct nlmsghdr n;
struct ifaddrlblmsg ifal;
- char buf[1024];
+ char buf[1024];
} req;
inet_prefix prefix;
.maxattr = IFLA_CAN_MAX,
.parse_opt = can_parse_opt,
.print_opt = can_print_opt,
- .print_xstats = can_print_xstats,
+ .print_xstats = can_print_xstats,
};
static int ipneigh_modify(int cmd, int flags, int argc, char **argv)
{
struct {
- struct nlmsghdr n;
- struct ndmsg ndm;
- char buf[256];
+ struct nlmsghdr n;
+ struct ndmsg ndm;
+ char buf[256];
} req;
char *d = NULL;
int dst_ok = 0;
static int ipntable_modify(int cmd, int flags, int argc, char **argv)
{
struct {
- struct nlmsghdr n;
+ struct nlmsghdr n;
struct ndtmsg ndtm;
- char buf[1024];
+ char buf[1024];
} req;
char *namep = NULL;
char *threshsp = NULL;
static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
{
struct {
- struct nlmsghdr n;
- struct rtmsg r;
- char buf[1024];
+ struct nlmsghdr n;
+ struct rtmsg r;
+ char buf[1024];
} req;
char mxbuf[256];
struct rtattr * mxrta = (void*)mxbuf;
static int iproute_get(int argc, char **argv)
{
struct {
- struct nlmsghdr n;
- struct rtmsg r;
- char buf[1024];
+ struct nlmsghdr n;
+ struct rtmsg r;
+ char buf[1024];
} req;
char *idev = NULL;
char *odev = NULL;
fprintf(fp, "tos %s ", rtnl_dsfield_n2a(r->rtm_tos, b1, sizeof(b1)));
}
- if (tb[FRA_FWMARK] || tb[FRA_FWMASK]) {
+ if (tb[FRA_FWMARK] || tb[FRA_FWMASK]) {
__u32 mark = 0, mask = 0;
if (tb[FRA_FWMARK])
{
int table_ok = 0;
struct {
- struct nlmsghdr n;
- struct rtmsg r;
- char buf[1024];
+ struct nlmsghdr n;
+ struct rtmsg r;
+ char buf[1024];
} req;
memset(&req, 0, sizeof(req));
struct {
struct nlmsghdr n;
__u32 flags;
- char ans[128];
+ char ans[128];
} req;
memset(&req, 0, sizeof(req));
{
struct rtnl_handle rth;
struct {
- struct nlmsghdr n;
+ struct nlmsghdr n;
struct xfrm_usersa_info xsinfo;
- char buf[RTA_BUF_SIZE];
+ char buf[RTA_BUF_SIZE];
} req;
struct xfrm_replay_state replay;
char *idp = NULL;
{
struct rtnl_handle rth;
struct {
- struct nlmsghdr n;
+ struct nlmsghdr n;
struct xfrm_userspi_info xspi;
- char buf[RTA_BUF_SIZE];
+ char buf[RTA_BUF_SIZE];
} req;
char *idp = NULL;
char *minp = NULL;
{
struct rtnl_handle rth;
struct {
- struct nlmsghdr n;
+ struct nlmsghdr n;
struct xfrm_usersa_id xsid;
- char buf[RTA_BUF_SIZE];
+ char buf[RTA_BUF_SIZE];
} req;
struct xfrm_id id;
char *idp = NULL;