Back to index

glibc  2.9
Functions | Variables
tst-network.c File Reference
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

Go to the source code of this file.


int main (void)


struct {
const char * network
uint32_t number
tests []

Function Documentation

int main ( void  )

Definition at line 54 of file tst-network.c.

  int errors = 0;
  size_t i;
  uint32_t res;

  for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
      printf ("Testing: %s\n", tests[i].network);
      res = inet_network (tests[i].network);

      if (res != tests[i].number)
         printf ("Test failed for inet_network (\"%s\"):\n",
         printf ("Expected return value %u (0x%x) but got %u (0x%x).\n",
                tests[i].number, tests[i].number, res, res);


  return errors != 0;

Here is the call graph for this function:

Variable Documentation

struct { ... } tests[]