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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [net/] [tcpip/] [v2_0/] [doc/] [getproto.man] - Blame information for rev 356

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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