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

Function knownname

tools/netstat/main.c:946–956  ·  view source on GitHub ↗

* Find the protox for the given "well-known" name. */

Source from the content-addressed store, hash-verified

944 * Find the protox for the given "well-known" name.
945 */
946static struct protox *
947knownname(const char *name)
948{
949 struct protox **tpp, *tp;
950
951 for (tpp = protoprotox; *tpp; tpp++)
952 for (tp = *tpp; tp->pr_name; tp++)
953 if (strcmp(tp->pr_name, name) == 0)
954 return (tp);
955 return (NULL);
956}
957
958/*
959 * Find the protox corresponding to name.

Callers 1

name2protoxFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected