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

Function ng_ether_sanitize_ifname

freebsd/netgraph/ng_ether.c:222–235  ·  view source on GitHub ↗

UTILITY FUNCTIONS ******************************************************************/

Source from the content-addressed store, hash-verified

220 UTILITY FUNCTIONS
221******************************************************************/
222static void
223ng_ether_sanitize_ifname(const char *ifname, char *name)
224{
225 int i;
226
227 for (i = 0; i < IFNAMSIZ; i++) {
228 if (ifname[i] == '.' || ifname[i] == ':')
229 name[i] = '_';
230 else
231 name[i] = ifname[i];
232 if (name[i] == '\0')
233 break;
234 }
235}
236
237/******************************************************************
238 ETHERNET FUNCTION HOOKS

Callers 2

ng_ether_attachFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected