OMAPI using dhcpctl to create a class results in Invalid argument

Jeff Waller jeffw at cnxntech.com
Tue Dec 13 20:01:24 UTC 2011


the following results in invalid argument being returned in waitstatus.  It is likely
that there is some parameter that is not being set that must be.  I have not spent
a great deal of time tracing where exactly the error lies but it appears to arise 
in protocol.c while interpreting the results.

There's really insufficient documentation to tell if this should or should not work,
so I'm simply posting to see where that leads us.

-Jeff


   dhcpctl_initialize();
   dhcpctl_connect(&connection,"127.0.0.1",7911,0);
   dhcpctl_new_object(&new_class,connection,"class");
   dhcpctl_set_string_value(new_class,argv[1],"name");
   dhcpctl_open_object(new_class,connection,DHCPCTL_CREATE);
   dhcpctl_wait_for_completion(new_class,&waitstatus);
   if(waitstatus != ISC_R_SUCCESS)
   {
      fprintf(stderr,"%s: OMAPI update failed (%s)\n",argv[0],isc_result_totext(waitstatus));
      exit(2);
   }




More information about the dhcp-hackers mailing list