.TH "pydhcplib.strlist" "3" "" "" "PYDHCPLIB" .SH "NAME" pydhcplib.strlist \- Internal type of pydhcplib for lists of bytes processing. .SH "SYNOPSIS" from pydhcplib.type_hw_addr import hwmac a = strlist() .br a = strlist([100,100,10,42,44,26]) .SH "DESCRIPTION" The class pydhcplib.strlist is an specific type of pydhcplib. It exist in order to simplify processing of raw data from network. When a dhcp packet dhcp is received, it's a succession of approximately 300 bytes. Within pydhcplib these data are transformed in an intermediary form of type "strlist" in order to facilitate their handling. This intermediary form will eventually be suppressed in the stable versions of pydhcplib to speedup the processing time, but backward compatibility will be assured. The pydhcplib.strlist class creation argument can be a list of numbers whose value goes from 0?55. The pydhcplib.strlist class creation argument can be a string of ASCII character. .SH "METHODS" The implemented methods in this type are mostly comparison methods (= =, >, etc...) else : str() convert the address into a printable string type. list() convert the address into a list of bytes. .SH "EXAMPLES" \fBExample program strlist_example.py :\fR from pydhcplib.type_strlist import strlist word = strlist() .br word1 = strlist("azerty") .br word2 = strlist("qwerty") .br word3 = strlist([97, 122, 101, 114, 116, 121]) print "a0 : ",word .br print "a1 : ",word1 .br print "a2 : ",word2 .br print "a3 : ",word3 if word1 == word2 : .br print "test 1 : ",word1, "==",word2 .br else : .br print "test 1 : " ,word1, "!=",word2 if word1 == word3 : .br print "test 2 : ", word1, "==",word3 .br else : .br print "test 2 : ", word1, "!=",word3 .SH "SEE ALSO" pydhcp(8), pydhcplib.hwmac(3), pydhcplib.ipv4(3), pydhcplib.strlist(3), pydhcplib.DhcpPacket(3), pydhcplib.DhcpBasicPacket(3), pydhcplib.DhcpNetwork(3), pydhcplib.DhcpClient(3), pydhcplib.DhcpRawClient(3), pydhcplib.DhcpDerver(3) .SH "BUGS" See http://pydhcplib.tuxfamily.org/ for more information. .SH "AUTHOR" Mathieu Ignacio (mignacio[AT]april.org)