version 1.90, 2001/05/23 23:32:52
|
version 1.91, 2001/05/23 23:44:35
|
Line 78 int main(int argc,char *argv[]) {
|
Line 78 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("maddison.math.fu-berlin.de","ssh",&hints,&ai)); |
printf("%d\n",getaddrinfo("borg","ssh",&hints,&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 136 int main(int argc,char *argv[]) {
|
Line 136 int main(int argc,char *argv[]) {
|
foo[6]=0; |
foo[6]=0; |
puts(foo); |
puts(foo); |
#endif |
#endif |
#if 1 |
#if 0 |
struct hostent * host; |
struct hostent * host; |
struct in_addr i; |
struct in_addr i; |
|
|