getprotoent.3 (0d9deed52c5ed3b24d2da5ec3a0a172fe9092a96) | getprotoent.3 (5744601120ac8a73215df499be15e47f16d594bb) |
---|---|
1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 51 unchanged lines hidden (view full) --- 60.Fn getprotobynumber 61functions 62each return a pointer to an object with the 63following structure 64containing the broken-out 65fields of a line in the network protocol data base, 66.Pa /etc/protocols . 67.Bd -literal -offset indent | 1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 51 unchanged lines hidden (view full) --- 60.Fn getprotobynumber 61functions 62each return a pointer to an object with the 63following structure 64containing the broken-out 65fields of a line in the network protocol data base, 66.Pa /etc/protocols . 67.Bd -literal -offset indent |
68struct protoent { | 68struct protoent { |
69 char *p_name; /* official name of protocol */ 70 char **p_aliases; /* alias list */ 71 int p_proto; /* protocol number */ 72}; 73.Ed 74.Pp 75The members of this structure are: 76.Bl -tag -width p_aliases --- 35 unchanged lines hidden (view full) --- 112sequentially search from the beginning 113of the file until a matching 114protocol name or 115protocol number is found, 116or until 117.Dv EOF 118is encountered. 119.Sh RETURN VALUES | 69 char *p_name; /* official name of protocol */ 70 char **p_aliases; /* alias list */ 71 int p_proto; /* protocol number */ 72}; 73.Ed 74.Pp 75The members of this structure are: 76.Bl -tag -width p_aliases --- 35 unchanged lines hidden (view full) --- 112sequentially search from the beginning 113of the file until a matching 114protocol name or 115protocol number is found, 116or until 117.Dv EOF 118is encountered. 119.Sh RETURN VALUES |
120Null pointer 121(0) returned on | 120Null pointer returned on |
122.Dv EOF 123or error. 124.Sh FILES 125.Bl -tag -width /etc/protocols -compact 126.It Pa /etc/protocols 127.El 128.Sh SEE ALSO 129.Xr protocols 5 --- 16 unchanged lines hidden --- | 121.Dv EOF 122or error. 123.Sh FILES 124.Bl -tag -width /etc/protocols -compact 125.It Pa /etc/protocols 126.El 127.Sh SEE ALSO 128.Xr protocols 5 --- 16 unchanged lines hidden --- |