| 96 | } |
| 97 | |
| 98 | static void |
| 99 | setlaggflowidshift(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 | |
| 114 | static void |
| 115 | setlaggrr_limit(const char *val, int d, int s, const struct afswtch *afp) |