ポート番号とプロトコル名からサービス情報を収めたservent 構造体を返す
struct servent* FAR getservbyport(
int port,
const char* proto
);
port
- The port for a service, in network byte order.
proto
- An optional pointer to a protocol name. If this is NULL, getservbyport() returns the first service entry for which the port matches the s_port. Otherwise getservbyport() matches both the port and the proto.