<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 29, 2012, at 2:10 AM, caterwaul wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Hi friends,<div><br></div><div>I just start to use ISC dhcp(dhcp-4.2.4-P2) and have some questions about its test to ask. Thank you in advance.</div><div><br></div><div><br></div><div>1 In tests/HOWTO-unit-test</div><div>It says the following directories contain unit tests: client/ common/ dhcpctl/. But actually only common/ directory does. </div><div><b>How about other directories?</b></div></div></blockquote><div><br></div>I believe the intention was to add more tests over time.</div><div><br><blockquote type="cite"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div><br></div><div><br></div><div>2 In tests/DHCPv6/README</div><div>It says:</div><div><div><i>To use, the DHCPv6 server must be running in test mode to send back to</i></div><div><i>the originating port. (The scripts can be changed to bind to the</i></div><div><i>appropriate client port, but they don't now, and have to run as root</i></div><div><i>to do this). In server/dhcpv6.c, look for this comment:</i></div><div><i><br></i></div><div><i>/* For testing, we reply to the sending port, so we don't ne
ed a root */</i></div><div><i>/* client */</i></div><div><i><span class="Apple-tab-span" style="white-space:pre"> </span>to_addr.sin6_port = remote_port;</i></div><div><i>/*<span class="Apple-tab-span" style="white-space:pre"> </span>to_addr.sin6_port = packet->client_port;*/</i></div><div><i><br></i></div><div><i>And change the code to use the client_port value.</i></div></div><div><i><br></i></div><div><b>How does it work by using client_port generally?</b></div><div><b>How to run DHCPv6 in test mode?</b></div><div><br></div></div></blockquote>I believe the test mode refers to using the test configuration and using</div><div>the client port from the incoming packet instead of the well known port.</div><div>See the REPLY_TO_SOURCE_PORT option in includes/site.h to enable</div><div>this feature.</div><div><br><blockquote type="cite"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div><br></div><div>3 In tests/DHCPv6/README</div><div><div>It says <i>You will need to modify one of the test configuration files to use one of the physical subnets that your machine uses, in the subnet6 statement.</i></div></div><div><b>How should I modify that configuration file in detail? Please give me a example.</b></div></div></blockquote><div><br></div>See the bottom of tests/DHCPv6/test-a.conf. There is a stanza of</div><div><div>subnet6 fe80::20c:29ff:fe42:820/128 {</div><div>}</div><div><br></div><div>You may need to adjust that to use a subnet known to your machine.</div><div><br></div><blockquote type="cite"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div><br></div><div>4 In tests/DHCPv6</div><div><b>Are all these pearl script used to test only DHCPv6 server?</b></div></div></blockquote>Yes</div><div><br><blockquote type="cite"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><d iv=""><br></d></div><div><br></div><div>BR/Jim</div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>_______________________________________________<br>dhcp-users mailing list<br><a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>https://lists.isc.org/mailman/listinfo/dhcp-users</blockquote></div><br></body></html>