test_pump_static.c

00001 #include <sys/types.h>
00002 #include <unistd.h>
00003 #include <string.h>
00004 #include <stdio.h>
00005 
00006 #include <pump.h>
00007 
00008 int main( int argc, char **argv, char **envp)
00009 {
00010     struct pumpNetIntf ifx =
00011     {
00012         .device    = "eth0",
00013         .ip        = ip_addr_text("192.168.2.5"),
00014         .netmask   = ip_addr_text("255.255.255.0"),
00015         .broadcast = ip_addr_text("192.168.2.255"),
00016         .gateway   = ip_addr_text("192.168.2.1")
00017     };
00018     
00019     char *s = pumpSetupInterface(&ifx);
00020     if ( s != 0L )
00021     {
00022         printf("%s\n",s);
00023         return 1;
00024     }
00025     return 0;
00026 }

Generated on Thu Aug 10 22:16:40 2006 for libdhcp by  doxygen 1.4.7