getprotoent(3) Library Functions Manual getprotoent(3) NOMBRE getprotoent, getprotobyname, getprotobynumber, setprotoent, endprotoent - obtienen una entrada del fichero de protocolos BIBLIOTECA Biblioteca Estandar C (libc, -lc) SINOPSIS #include struct protoent *getprotoent(void); struct protoent *getprotobyname(const char *nombre); struct protoent *getprotobynumber(int proto); void setprotoent(int sigue_abierto); void endprotoent(void); DESCRIPCION La funcion getprotoent() lee la siguiente linea de la base de datos de protocolos (consulte protocols(5)) y devuelve una estructura protoent que contiene los campos de que consta la linea. Si necesario, se abre una conexion a la base de datos. La funcion getprotobyname() devuelve una estructura protoent para la linea de /etc/protocols que concuerde con el nombre de protocolo nombre. Si necesario, se abre una conexion 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 asi: struct protoent { char *p_name; /* nombre oficial de protocolo */ char **p_aliases; /* lista de sinonimos */ int p_proto; /* numero 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 numero 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 explicacion de los terminos usados en esta seccion, vease attributes(7). +-------------------+--------------------+-----------------------------+ |Interfaz | Atributo | Valor | +-------------------+--------------------+-----------------------------+ |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(), | Seguridad del hilo | MT-Unsafe race:protoent | |endprotoent() | | 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. ESTANDARES POSIX.1-2008. HISTORIAL POSIX.1-2001, 4.3BSD. VEASE TAMBIEN getnetent(3), getprotoent_r(3), getservent(3), protocols(5) TRADUCCION La traduccion al espanol de esta pagina del manual fue creada por Gerardo Aburruzaga Garcia y Marcos Fouces Esta traduccion es documentacion libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. Si encuentra algun error en la traduccion de esta pagina del manual, envie un correo electronico a . Paginas de manual de Linux 6.06 31 Octubre 2023 getprotoent(3)