Lines Matching defs:label
121 static void display_data(unsigned rport, char *label,
132 if (!strcmp(label, "tcp")) {
137 else if (!strcmp(label, "udp")) {
141 else if (!strcmp(label, "raw")) sprintf(ss_state = buf, "%u", state);
147 xprintf("%3s %6d %6d ", label, rxq, txq);
159 static void show_data(unsigned rport, char *label, unsigned rxq, unsigned txq,
165 display_data(rport, label, rxq, txq, lip, rip, state, uid, inode);
167 display_data(rport, label, rxq, txq, lip, rip, state, uid, inode);
170 display_data(rport, label, rxq, txq, lip, rip, state, uid, inode);
176 static char *get_servname(int port, char *label)
180 struct servent *ser = getservbyport(lport, label);
188 static void addr2str(int af, void *addr, unsigned port, char *buf, char *label)
223 sname = get_servname(port, label);
241 static void show_ipv4(char *fname, char *label)
261 addr2str(AF_INET, &laddr, lport, lip, label);
262 addr2str(AF_INET, &raddr, rport, rip, label);
263 show_data(rport, label, rxq, txq, lip, rip, state, uid, inode);
272 static void show_ipv6(char *fname, char *label)
294 addr2str(AF_INET6, &laddr6, lport, lip, label);
295 addr2str(AF_INET6, &raddr6, rport, rip, label);
296 show_data(rport, label, rxq, txq, lip, rip, state, uid, inode);
305 static void show_unix_sockets(char *fname, char *label)
316 unsigned long refcount, label, flags, inode;
323 &refcount, &label, &flags, &type, &state, &inode, &path_offset);
360 xprintf("%-5s %-6ld %-11s %-10s %-13s %8lu ", (!label ? "unix" : "??"),