dhcp options 121,63
Denis Vlasenko
vda.linux at googlemail.com
Sat Feb 2 18:04:06 UTC 2008
On Tuesday 29 January 2008 14:43, Nikos Mavrogiannopoulos wrote:
> I've submitted a patch in http://bugs.busybox.net/view.php?id=1999 to support
> the DHCP options 121, 63. The static routes option exports a variable
> $sroutes that contains NETWORK1 NETMASK1 GATEWAY1 NETWORK2 NETMASK2 GATEWAY2
> etc. The vendorinfo option is quite intrusive and allows to export vendorinfo
> suboptions via the dhcp_sub_options structure.
Needs to be rediffed against 1.9.0. There were many changes in DHCP
applets in 1.9.0.
Also:
+static uint8_t* mask_to_ip(uint8_t * ip, uint8_t mask)
+{
+int i;
+uint32_t ret = 0;
Broken indentation.
+inline
+static void extract_route_octets( uint8_t *ret_ip, uint8_t* p, int mask, int *adv)
+{
+*adv = 0;
It's too big for inline.
+ case OPTION_STATIC_ROUTES: {
+ /* we return the static routes in a string containing a list
+ * of NETWORK1 NETMASK1 GATEWAY1 NETWORK2 NETMASK2 GATEWAY2 ... */
+ int left = len;
+ int mask;
+ int adv;
+ uint8_t *p = option;
+ uint8_t ip[4];
+
+ *dest = 0;
+
+ do {
+ mask = *p;
Please indent with tabs, not spaces.
--
vda
More information about the busybox
mailing list