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

Function ifc_simple_match

freebsd/net/if_clone.c:668–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668static int
669ifc_simple_match(struct if_clone *ifc, const char *name)
670{
671 const char *cp;
672 int i;
673
674 /* Match the name */
675 for (cp = name, i = 0; i < strlen(ifc->ifc_name); i++, cp++) {
676 if (ifc->ifc_name[i] != *cp)
677 return (0);
678 }
679
680 /* Make sure there's a unit number or nothing after the name */
681 for (; *cp != '\0'; cp++) {
682 if (*cp < '0' || *cp > '9')
683 return (0);
684 }
685
686 return (1);
687}
688
689static int
690ifc_simple_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)

Callers 2

if_clone_createFunction · 0.85
if_clone_destroyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected