<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal">I have a question regarding the boot process with pxelinux.0.<o:p></o:p></p>
<p class="MsoNormal">Why the create_fakedhcpack() function should also call copy_settings() for the global settings and not just for the netdev_settings?<o:p></o:p></p>
<p class="MsoNormal">Which settings I will need that are not saved in the netdev_settings?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">int create_fakedhcpack ( struct net_device *netdev,<o:p></o:p></p>
<p class="MsoNormal"> void *data, size_t max_len ) {<o:p></o:p></p>
<p class="MsoNormal"> struct dhcp_packet dhcppkt;<o:p></o:p></p>
<p class="MsoNormal"> int rc;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> /* Create base DHCPACK packet */<o:p></o:p></p>
<p class="MsoNormal"> if ( ( rc = dhcp_create_packet ( &dhcppkt, netdev, DHCPACK,<o:p></o:p></p>
<p class="MsoNormal"> dhcp_last_xid, NULL, 0,<o:p></o:p></p>
<p class="MsoNormal"> data, max_len ) ) != 0 ) {<o:p></o:p></p>
<p class="MsoNormal"> DBG ( "Could not create DHCPACK: %s\n", strerror ( rc ) );<o:p></o:p></p>
<p class="MsoNormal"> return rc;<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> /* Merge in globally-scoped settings, then netdev-specific<o:p></o:p></p>
<p class="MsoNormal"> * settings. Do it in this order so that netdev-specific<o:p></o:p></p>
<p class="MsoNormal"> * settings take precedence regardless of stated priorities.<o:p></o:p></p>
<p class="MsoNormal"> */<o:p></o:p></p>
<p class="MsoNormal"> if ( ( rc = copy_settings ( &dhcppkt, NULL ) ) != 0 ) {<o:p></o:p></p>
<p class="MsoNormal"> DBG ( "Could not set DHCPACK global settings: %s\n",<o:p></o:p></p>
<p class="MsoNormal"> strerror ( rc ) );<o:p></o:p></p>
<p class="MsoNormal"> return rc;<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> if ( ( rc = copy_settings ( &dhcppkt,<o:p></o:p></p>
<p class="MsoNormal"> netdev_settings ( netdev ) ) ) != 0 ) {<o:p></o:p></p>
<p class="MsoNormal"> DBG ( "Could not set DHCPACK netdev settings: %s\n",<o:p></o:p></p>
<p class="MsoNormal"> strerror ( rc ) );<o:p></o:p></p>
<p class="MsoNormal"> return rc;<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> return 0;<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><i><span style="font-size:12.0pt">Regards,</span></i><o:p></o:p></p>
<p class="MsoNormal"><i><span style="font-size:12.0pt">Wissam</span></i><o:p></o:p></p>
<p class="MsoNormal"><i><span style="font-size:12.0pt"> </span></i><o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-family:"Verdana","sans-serif";color:#17365D"> </span></b><o:p></o:p></p>
<p class="MsoNormal"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="Picture_x0020_1" o:spid="_x0000_s1026" type="#_x0000_t75" alt="cid:image002.png@01CE686B.47045A20" style='position:absolute;margin-left:0;margin-top:0;width:51pt;height:39pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:left;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:line;mso-width-percent:0;mso-height-percent:0;mso-width-relative:page;mso-height-relative:page' o:allowoverlap="f">
<v:imagedata src="cid:image001.png@01CF3EC9.66E4E820" o:title="image002.png@01CE686B" />
<w:wrap type="square" anchory="line"/>
</v:shape><![endif]--><![if !vml]><img width="68" height="52" src="cid:image001.png@01CF3EC9.66E4E820" align="left" hspace="12" alt="cid:image002.png@01CE686B.47045A20" v:shapes="Picture_x0020_1"><![endif]><b><span style="font-family:"Verdana","sans-serif";color:#17365D">Wissam
Shoukair</span></b><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:gray">Software Engineer | Mellanox Technologies Ltd.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:gray">Work: +972 74 7236820 | Cell +972 50 783 6933</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>