lots of new stuff

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@299 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-03-17 00:51:52 +00:00
parent 81cbbf7820
commit e40b97b423
21 changed files with 2152 additions and 3 deletions

17
lib/krb5/get_port.c Normal file
View File

@@ -0,0 +1,17 @@
#include <krb5_locl.h>
int
krb5_getportbyname (const char *service,
const char *proto,
int default_port)
{
struct servent *sp;
if ((sp = getservbyname (service, proto)) == NULL) {
fprintf (stderr, "%s/%s unknown service, "
"using default port %d\n", service, proto,
ntohs(default_port));
return default_port;
} else
return sp->s_port;
}