3 static struct protoent
*NetProtDB_protoent
;
5 C_String_t
NetProtDB_getEntryName(void) {
6 return (C_String_t
)(NetProtDB_protoent
->p_name
);
9 C_Int_t
NetProtDB_getEntryAliasesNum(void) {
11 while (NetProtDB_protoent
->p_aliases
[num
] != NULL
) num
++;
15 C_String_t
NetProtDB_getEntryAliasesN(C_Int_t n
) {
16 return (C_String_t
)(NetProtDB_protoent
->p_aliases
[n
]);
19 C_Int_t
NetProtDB_getEntryProto(void) {
20 return NetProtDB_protoent
->p_proto
;
23 C_Int_t
NetProtDB_getByName(NullString8_t name
) {
24 NetProtDB_protoent
= getprotobyname((const char*)name
);
25 return (C_Int_t
)(NetProtDB_protoent
!= NULL
and NetProtDB_protoent
->p_name
!= NULL
);
28 C_Int_t
NetProtDB_getByNumber(C_Int_t proto
) {
29 NetProtDB_protoent
= getprotobynumber(proto
);
30 return (C_Int_t
)(NetProtDB_protoent
!= NULL
and NetProtDB_protoent
->p_name
!= NULL
);