1NAME(3) BSD Library Functions Manual NAME(3)
2
4 krb5_getportbyname — get port number by name
5
7 Kerberos 5 Library (libkrb5, -lkrb5)
8
10 #include <krb5.h>
11
12 int
13 krb5_getportbyname(krb5_context context, const char *service,
14 const char *proto, int default_port);
15
17 krb5_getportbyname() gets the port number for service / proto pair from
18 the global service table for and returns it in network order. If it
19 isn't found in the global table, the default_port (given in host order)
20 is returned.
21
23 int port = krb5_getportbyname(context, "kerberos", "tcp", 88);
24
26 krb5(3)
27
28HEIMDAL August 15, 2004 HEIMDAL