Updated to fedora-glibc-20040930T0838
[glibc/history.git] / sunrpc / tst-getmyaddr.c
blob1eaf9b22cafa3df473c30e96a52ef728f36f4dd5
1 #include <stdio.h>
2 #include <string.h>
3 #include <arpa/inet.h>
4 #include <netinet/in.h>
5 #include <rpc/clnt.h>
8 static int
9 do_test (void)
11 struct sockaddr_in ad;
12 struct sockaddr_in ad2;
13 memset (&ad, '\0', sizeof (ad));
14 memset (&ad2, '\0', sizeof (ad2));
16 get_myaddress (&ad);
18 printf ("addr = %s:%d\n", inet_ntoa (ad.sin_addr), ad.sin_port);
20 return memcmp (&ad, &ad2, sizeof (ad)) == 0;
23 #define TEST_FUNCTION do_test ()
24 #include "../test-skeleton.c"