2008-04-23から1日間の記事一覧
サンプルソース (getservbyname_sample.c) #include <stdio.h> #include <netdb.h> /* getservbyname() */ int main(int argc, char **argv) { struct servent *n; if(argc == 1) { printf("usage: %s protocol_name\n", argv[0]); return 1; } if((n = getservbyname(argv[1],</netdb.h></stdio.h>…