Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Examples  

test_IP2hex.c

This file shows how to ude the function IP2hex().

#include "strings_utils.h"
#include <stdio.h>

int main (int argc, char *argv[])
{
   char res[12], *pt;

   if (argc != 2)
   {
      fprintf (stdout, "\nUsage: IP2hex.test IP_address\n");
      return 1;
   }

   pt = IP2hex(argv[1] , res, 12);
   if (pt == NULL)
   {
      fprintf (stdout, "\nError\n");
      return 1;
   }

   fprintf (stdout, "\nIP in hexa: [%s]\n\n", res);
   return 0;
}

Generated on Thu Apr 3 16:23:40 2003 for Common_C_libraries by doxygen1.3-rc1