lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | #include <stdio.h> |
| 2 | #include <string.h> |
| 3 | #include <arpa/inet.h> |
| 4 | #include <netinet/in.h> |
| 5 | #include <rpc/clnt.h> |
| 6 | |
| 7 | |
| 8 | static int |
| 9 | do_test (void) |
| 10 | { |
| 11 | struct sockaddr_in ad; |
| 12 | struct sockaddr_in ad2; |
| 13 | memset (&ad, '\0', sizeof (ad)); |
| 14 | memset (&ad2, '\0', sizeof (ad2)); |
| 15 | |
| 16 | get_myaddress (&ad); |
| 17 | |
| 18 | printf ("addr = %s:%d\n", inet_ntoa (ad.sin_addr), ad.sin_port); |
| 19 | |
| 20 | return memcmp (&ad, &ad2, sizeof (ad)) == 0; |
| 21 | } |
| 22 | |
| 23 | #define TEST_FUNCTION do_test () |
| 24 | #include "../test-skeleton.c" |