Back to index

glibc  2.9
Defines | Functions
tst-getmyaddr.c File Reference
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <rpc/clnt.h>
#include "../test-skeleton.c"

Go to the source code of this file.


#define TEST_FUNCTION   do_test ()


static int do_test (void)

Define Documentation

#define TEST_FUNCTION   do_test ()

Definition at line 23 of file tst-getmyaddr.c.

Function Documentation

static int do_test ( void  ) [static]

Definition at line 9 of file tst-getmyaddr.c.

  struct sockaddr_in ad;
  struct sockaddr_in ad2;
  memset (&ad, '\0', sizeof (ad));
  memset (&ad2, '\0', sizeof (ad2));

  get_myaddress (&ad);

  printf ("addr = %s:%d\n", inet_ntoa (ad.sin_addr), ad.sin_port);

  return memcmp (&ad, &ad2, sizeof (ad)) == 0;

Here is the call graph for this function: