krb5_getportbyname man page

krb5_getportbyname — get port number by name

Library

Kerberos 5 Library (libkrb5, -lkrb5)

Synopsis

#include <krb5.h>

int
krb5_getportbyname(krb5_context context, const char *service, const char *proto, int default_port);

Description

krb5_getportbyname() gets the port number for service / proto pair from the global service table for and returns it in network order. If it isn't found in the global table, the default_port (given in host order) is returned.

Example

int port = krb5_getportbyname(context, "kerberos", "tcp", 88);

See Also

krb5(3)

Info

August 15, 2004