The standard library Net_Protocol_Db api defines access to basic TCP/IP logic to look up a protocol by name or by number.
The Net_Protocol_Db api is implemented by the net_protocol_db package.
The Net_Protocol_Db api source code is in src/lib/std/src/socket/net-protocol-db.api. The above information is manually maintained and may contain errors.
api { Entry; name : Entry -> String; aliases : Entry -> List(String ); protocol : Entry -> Int; get_by_name : String -> Null_Or(Entry ); get_by_number : Int -> Null_Or(Entry ); Protoent; get_prot_by_name__syscall : String -> Null_Or(Protoent ); set__get_prot_by_name__ref : ( {fun_name:String, io_call:String -> Null_Or(Protoent ), lib_name:String} -> String -> Null_Or(Protoent ) ) -> Void; get_prot_by_number__syscall : Int -> Null_Or(Protoent ); set__get_prot_by_number__ref : ({fun_name:String, io_call:Int -> Null_Or(Protoent ), lib_name:String} -> Int -> Null_Or(Protoent )) -> Void;};