[ipxe-devel] global settings and pxelinux.0

Wissam Shoukair wissams at mellanox.com
Thu Mar 13 12:34:55 UTC 2014


Hi,
I have a question regarding the boot process with pxelinux.0.
Why the create_fakedhcpack() function should also call copy_settings() for the global settings and not just for the netdev_settings?
Which settings I will need that are not saved in the netdev_settings?

Thanks

int create_fakedhcpack ( struct net_device *netdev,
                         void *data, size_t max_len ) {
        struct dhcp_packet dhcppkt;
        int rc;

        /* Create base DHCPACK packet */
        if ( ( rc = dhcp_create_packet ( &dhcppkt, netdev, DHCPACK,
                                         dhcp_last_xid, NULL, 0,
                                         data, max_len ) ) != 0 ) {
                DBG ( "Could not create DHCPACK: %s\n", strerror ( rc ) );
                return rc;
        }

        /* Merge in globally-scoped settings, then netdev-specific
         * settings.  Do it in this order so that netdev-specific
         * settings take precedence regardless of stated priorities.
         */
        if ( ( rc = copy_settings ( &dhcppkt, NULL ) ) != 0 ) {
                DBG ( "Could not set DHCPACK global settings: %s\n",
                      strerror ( rc ) );
                return rc;
        }
        if ( ( rc = copy_settings ( &dhcppkt,
                                    netdev_settings ( netdev ) ) ) != 0 ) {
                DBG ( "Could not set DHCPACK netdev settings: %s\n",
                      strerror ( rc ) );
                return rc;
        }

        return 0;
}

Regards,
Wissam


[cid:image002.png at 01CE686B.47045A20]Wissam Shoukair
Software Engineer | Mellanox Technologies Ltd.
Work: +972 74 7236820 | Cell +972 50 783 6933

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20140313/30f98cd5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6392 bytes
Desc: image001.png
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20140313/30f98cd5/attachment.png>


More information about the ipxe-devel mailing list