MCPcopy Create free account
hub / github.com/F-Stack/f-stack / setlaggflowidshift

Function setlaggflowidshift

tools/ifconfig/iflagg.c:98–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98static void
99setlaggflowidshift(const char *val, int d, int s, const struct afswtch *afp)
100{
101 struct lagg_reqopts ro;
102
103 bzero(&ro, sizeof(ro));
104 ro.ro_opts = LAGG_OPT_FLOWIDSHIFT;
105 strlcpy(ro.ro_ifname, name, sizeof(ro.ro_ifname));
106 ro.ro_flowid_shift = (int)strtol(val, NULL, 10);
107 if (ro.ro_flowid_shift & ~LAGG_OPT_FLOWIDSHIFT_MASK)
108 errx(1, "Invalid flowid_shift option: %s", val);
109
110 if (ioctl(s, SIOCSLAGGOPTS, &ro) != 0)
111 err(1, "SIOCSLAGGOPTS");
112}
113
114static void
115setlaggrr_limit(const char *val, int d, int s, const struct afswtch *afp)

Callers

nothing calls this directly

Calls 4

bzeroFunction · 0.85
strtolFunction · 0.85
strlcpyFunction · 0.50
ioctlFunction · 0.50

Tested by

no test coverage detected