version 1.125, 2001/07/11 00:12:39
|
version 1.126, 2001/07/11 13:07:38
|
Line 253 int main(int argc,char *argv[]) {
|
Line 253 int main(int argc,char *argv[]) {
|
printf("%p %p\n",inet_ntop(AF_INET6,ip,buf,100),buf); |
printf("%p %p\n",inet_ntop(AF_INET6,ip,buf,100),buf); |
puts(buf); |
puts(buf); |
#endif |
#endif |
#if 0 |
#if 1 |
struct addrinfo *ai; |
struct addrinfo *ai; |
struct addrinfo hints; |
struct addrinfo hints; |
char buf[16]; |
char buf[16]; |
hints.ai_family = AF_UNSPEC; |
hints.ai_family = AF_UNSPEC; |
hints.ai_flags = AI_PASSIVE|AI_CANONNAME; |
hints.ai_flags = AI_PASSIVE|AI_CANONNAME; |
hints.ai_socktype = SOCK_STREAM; |
hints.ai_socktype = SOCK_STREAM; |
printf("%d\n",getaddrinfo("ftp.fu-berlin.de","ftp",0,&ai)); |
printf("%d\n",getaddrinfo("xorn.continuum.local","ssh",0,&ai)); |
while (ai) { |
while (ai) { |
printf("found host %s, port %d, family %s, socktype %s\n",ai->ai_canonname, |
printf("found host %s, port %d, family %s, socktype %s\n",ai->ai_canonname, |
ntohs(ai->ai_family==AF_INET6?((struct sockaddr_in6*)ai->ai_addr)->sin6_port: |
ntohs(ai->ai_family==AF_INET6?((struct sockaddr_in6*)ai->ai_addr)->sin6_port: |
Line 408 int main(int argc,char *argv[]) {
|
Line 408 int main(int argc,char *argv[]) {
|
strftime(buf,512,"%A %B %Y\n",duh); |
strftime(buf,512,"%A %B %Y\n",duh); |
puts(buf); |
puts(buf); |
#endif |
#endif |
#if 1 |
#if 0 |
struct in_addr bar; |
struct in_addr bar; |
struct hostent *foo; |
struct hostent *foo; |
inet_aton("160.45.10.8",&bar); |
inet_aton("160.45.10.8",&bar); |