source: trunk/packages/python-pydhcplib/examples/gen_packet_example.py @ 2841

Last change on this file since 2841 was 1191, checked in by broder, 16 years ago

Strip the sipb-xen prefix from packages we didn't write

  • Property svn:executable set to *
File size: 437 bytes
Line 
1#!/usr/bin/python
2
3from pydhcplib.dhcp_packet import DhcpPacket
4from pydhcplib.type_strlist import strlist
5from pydhcplib.type_ipv4 import ipv4
6
7
8packet = DhcpPacket()
9
10packet.SetOption("domain_name",strlist("anemon.org").list())
11packet.SetOption("router",ipv4("192.168.0.1").list()+[6,4,2,1])
12packet.SetOption("time_server",[100,100,100,7,6,4,2,1])
13packet.SetOption("yiaddr",[192,168,0,18])
14
15packet.PrintHeaders()
16packet.PrintOptions()
Note: See TracBrowser for help on using the repository browser.