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

Function pr_family

tools/netstat/route.c:162–193  ·  view source on GitHub ↗

* Print address family header before a section of the routing table. */

Source from the content-addressed store, hash-verified

160 * Print address family header before a section of the routing table.
161 */
162void
163pr_family(int af1)
164{
165 const char *afname;
166
167 switch (af1) {
168 case AF_INET:
169 afname = "Internet";
170 break;
171#ifdef INET6
172 case AF_INET6:
173 afname = "Internet6";
174 break;
175#endif /*INET6*/
176 case AF_ISO:
177 afname = "ISO";
178 break;
179 case AF_CCITT:
180 afname = "X.25";
181 break;
182 case AF_NETGRAPH:
183 afname = "Netgraph";
184 break;
185 default:
186 afname = NULL;
187 break;
188 }
189 if (afname)
190 xo_emit("\n{k:address-family/%s}:\n", afname);
191 else
192 xo_emit("\n{L:Protocol Family} {k:address-family/%d}:\n", af1);
193}
194
195/* column widths; each followed by one space */
196#ifndef INET6

Callers 3

print_nhgrp_sysctlFunction · 0.85
print_nhops_sysctlFunction · 0.85
p_rtable_sysctlFunction · 0.85

Calls 1

xo_emitFunction · 0.85

Tested by

no test coverage detected