1getprotobyname(3z) z88dk Programmer's Manual getprotobyname(3z)
2
3
4
6 getprotobyname, getprotobynumber - get protocol entry
7
9 #include <net/resolv.h>
10
11 int getprotobyname(char *name);
12 char *getprotobynumber(int protocol, char * buf);
13
15 The getprotobyname() function returns the standard number for the pro‐
16 tocol with the name name. If no protocol is known then NULL is
17 returned.
18
19 The getprotobynumber() function copies into buf (and returns buf) the
20 protocol matching the protocol. If no protocol is known then protocol
21 is returned in ASCII form.
22
23
25 Detailed above.
26
27
29 These functions use a lookup table compiled into the ZSock kernel, it
30 is not likely that method will change in the near future.
31
32
34 Dominic Morris <dom@jb.man.ac.uk>
35
36
37
38 18 February 2000 getprotobyname(3z)