Allow fully qualified domains in the NICs table to override the
[invirt/packages/invirt-dhcp.git] / pydhcplib / examples / gen_packet_example.py
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()