OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [packages/] [net/] [tcpip/] [v2_0/] [doc/] [getproto.html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
<html>
2
<body>
3
<pre>
4
NAME
5
       getprotobyname,  getprotobynumber - get protocol entry
6
 
7
SYNOPSIS
8
       #include &lt;network.h&gt;
9
 
10
       struct protoent *getprotobyname(const char *name);
11
 
12
       struct protoent *getprotobynumber(int proto);
13
 
14
DESCRIPTION
15
       The getprotobyname() function returns a protoent structure
16
       for the line from /etc/protocols that matches the protocol
17
       name name.
18
 
19
       The  getprotobynumber() function returns a protoent struc­
20
       ture for the line that matches the protocol number number.
21
 
22
       The protoent structure is defined in <netdb.h> as follows:
23
 
24
              struct protoent {
25
                      char    *p_name;        /* official protocol name */
26
                      char    **p_aliases;    /* alias list */
27
                      int     p_proto;        /* protocol number */
28
              }
29
 
30
       The members of the protoent structure are:
31
 
32
       p_name The official name of the protocol.
33
 
34
       p_aliases
35
              A zero terminated list of alternative names for the
36
              protocol.
37
       p_proto
38
              The protocol number.
39
 
40
RETURN VALUE
41
       The getprotobyname() and getprotobynumber()
42
       functions return the protoent structure, or a NULL pointer
43
       if an error occurs.
44
 
45
 
46
</pre>
47
</body>
48
</html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.