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

Function scope6_ioctl

freebsd/netinet6/scope6.c:118–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118int
119scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
120{
121 struct in6_ifreq *ifr;
122
123 if (ifp->if_afdata[AF_INET6] == NULL)
124 return (EPFNOSUPPORT);
125
126 ifr = (struct in6_ifreq *)data;
127 switch (cmd) {
128 case SIOCSSCOPE6:
129 return (scope6_set(ifp,
130 (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id));
131 case SIOCGSCOPE6:
132 return (scope6_get(ifp,
133 (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id));
134 case SIOCGSCOPE6DEF:
135 return (scope6_get_default(
136 (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id));
137 default:
138 return (EOPNOTSUPP);
139 }
140}
141
142static int
143scope6_set(struct ifnet *ifp, struct scope6_id *idlist)

Callers 1

in6_controlFunction · 0.85

Calls 3

scope6_setFunction · 0.85
scope6_getFunction · 0.85
scope6_get_defaultFunction · 0.85

Tested by

no test coverage detected