oracular (3) getprotobynumber.3.gz

Provided by: manpages-es-dev_4.23.1-1_all bug

NOMBRE

       getprotoent,  getprotobyname,  getprotobynumber,  setprotoent,  endprotoent  -  obtienen  una entrada del
       fichero de protocolos

BIBLIOTECA

       Biblioteca Estándar C (libc, -lc)

SINOPSIS

       #include <netdb.h>

       struct protoent *getprotoent(void);

       struct protoent *getprotobyname(const char *nombre);
       struct protoent *getprotobynumber(int proto);

       void setprotoent(int sigue_abierto);
       void endprotoent(void);

DESCRIPCIÓN

       La función getprotoent() lee la siguiente línea de la base de datos de protocolos (consulte protocols(5))
       y  devuelve una estructura protoent que contiene los campos de que consta la línea. Si necesario, se abre
       una conexión a la base de datos.

       La función getprotobyname() devuelve  una  estructura  protoent  para  la  línea  de  /etc/protocols  que
       concuerde con el nombre de protocolo nombre. Si necesario, se abre una conexión a la base de datos.

       The  getprotobynumber()   function  returns  a  protoent  structure  for the entry from the database that
       matches the protocol number number.  A connection is opened to the database if necessary.

       The setprotoent()  function opens a connection to the database, and sets the  next  entry  to  the  first
       entry.   If  stayopen is nonzero, then the connection to the database will not be closed between calls to
       one of the getproto*()  functions.

       The endprotoent()  function closes the connection to the database.

       La estructura protoent se define en <netdb.h> así:

           struct protoent {
               char  *p_name;       /* nombre oficial de protocolo */
               char **p_aliases;    /* lista de sinónimos */
               int    p_proto;      /* número de protocolo */
           }

       Los miembros de la estructura protoent son:

       p_name El nombre oficial del protocolo.

       p_aliases
              Una lista terminada en NULL de nombres alternos para el protocolo.

       p_proto
              El número del protocolo.

VALOR DEVUELTO

       The getprotoent(), getprotobyname(), and getprotobynumber() functions return a pointer  to  a  statically
       allocated protoent structure, or a null pointer if an error occurs or the end of the file is reached.

ARCHIVOS

       /etc/protocols
              fichero con los datos de protocolos

ATRIBUTOS

       Para obtener una explicación de los términos usados en esta sección, véase attributes(7).

       ┌─────────────────────────────┬────────────────────┬─────────────────────────────────────────────────────┐
       │InterfazAtributoValor                                               │
       ├─────────────────────────────┼────────────────────┼─────────────────────────────────────────────────────┤
       │getprotoent()                │ Seguridad del hilo │ MT-Unsafe race:protoent race:protoentbuf locale     │
       ├─────────────────────────────┼────────────────────┼─────────────────────────────────────────────────────┤
       │getprotobyname()             │ Seguridad del hilo │ MT-Unsafe race:protobyname locale                   │
       ├─────────────────────────────┼────────────────────┼─────────────────────────────────────────────────────┤
       │getprotobynumber()           │ Seguridad del hilo │ MT-Unsafe race:protobynumber locale                 │
       ├─────────────────────────────┼────────────────────┼─────────────────────────────────────────────────────┤
       │setprotoent(), endprotoent() │ Seguridad del hilo │ MT-Unsafe race:protoent locale                      │
       └─────────────────────────────┴────────────────────┴─────────────────────────────────────────────────────┘
       In  the  above  table,  protoent  in  race:protoent signifies that if any of the functions setprotoent(),
       getprotoent(), or endprotoent()  are used in parallel in different threads of a program, then data  races
       could occur.

ESTÁNDARES

       POSIX.1-2008.

HISTORIAL

       POSIX.1-2001, 4.3BSD.

VÉASE TAMBIÉN

       getnetent(3), getprotoent_r(3), getservent(3), protocols(5)

TRADUCCIÓN

       La  traducción  al  español  de  esta  página  del  manual  fue  creada  por  Gerardo  Aburruzaga  García
       <gerardo.aburruzaga@uca.es> y Marcos Fouces <marcos@debian.org>

       Esta  traducción  es   documentación   libre;   lea   la   GNU   General   Public   License   Version   3
       ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩  o posterior con respecto a las condiciones de copyright.  No
       existe NINGUNA RESPONSABILIDAD.

       Si encuentra algún error en la traducción de esta página  del  manual,  envíe  un  correo  electrónico  a
       ⟨debian-l10n-spanish@lists.debian.org⟩.