Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <sys/types.h>
2
#include <unistd.h>
3
#include <stdio.h>
4
 
5
/* bsd extensions */
6
#include <sys/uio.h>
7
#include <sys/socket.h>
8
#include <netinet/in.h>
9
#include <netdb.h>
10
 
11
struct servent*
12
getservbyport(int port, char *proto)
13
{
14
	char buf[32];
15
 
16
	snprintf(buf, sizeof buf, "%d", port);
17
	return getservbyname(buf, proto);
18
}