#include <stdio.h>
#include <netdb.h>
main() {
struct servent *serv;
if ((serv = getservbyport(23, "tcp")) == NULL) {
printf("shit!\n");
} else {
printf("name: %s\n", serv->s_name);
}
}
Bartlomiej Czardybon
Silesian Technical University - Faculty of Computer Science