Last change
on this file since 537 was
361,
checked in by broder, 17 years ago
|
Splitting pydhcplib off into its own package
Hold onto your hats, folks - this could get messy
|
-
Property svn:executable set to
*
|
File size:
437 bytes
|
Rev | Line | |
---|
[361] | 1 | #!/usr/bin/python |
---|
| 2 | |
---|
| 3 | from pydhcplib.dhcp_packet import DhcpPacket |
---|
| 4 | from pydhcplib.type_strlist import strlist |
---|
| 5 | from pydhcplib.type_ipv4 import ipv4 |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | packet = DhcpPacket() |
---|
| 9 | |
---|
| 10 | packet.SetOption("domain_name",strlist("anemon.org").list()) |
---|
| 11 | packet.SetOption("router",ipv4("192.168.0.1").list()+[6,4,2,1]) |
---|
| 12 | packet.SetOption("time_server",[100,100,100,7,6,4,2,1]) |
---|
| 13 | packet.SetOption("yiaddr",[192,168,0,18]) |
---|
| 14 | |
---|
| 15 | packet.PrintHeaders() |
---|
| 16 | packet.PrintOptions() |
---|
Note: See
TracBrowser
for help on using the repository browser.