Thanks in advance.
I am researching if it is possible for unix (solaris) to print directly printers with IP addresses. Without adding all the ip addresses to the hosts file? There are more than a hundred printers and managing them in a hosts file would be tedius, prone to error, and time... (4 Replies)
im just trying to have some fun and kill some time writing a c++ program that has a person type in a car make and model then gives them a year and a price. or something like that. i always have problems getting it goin but once the ball is rolling im usually pretty good. anyone wanna help me out? ... (1 Reply)
Hi, i have a question about C++. Is it possible to declare a class with a member ot the same class? For example, a linked list or i want to convert this C code to C++ class (Elemento)
typedef struct elemento
{
char name;
char value;
List<struct elemento> ltElementos;
... (7 Replies)
How can I print the memory address of a pointer using printf (or any other STDOUT functions?). I see in Linux its %p but not in unix, help?
thanks (5 Replies)
Hi all!
I am trying to register a device in an existing device class, but I am
having trouble getting the pointer to an existing class.
I can create a class in a module, get the pointer to it and then use
it to register the device with:
*cl = class_create(THIS_MODULE, className);... (0 Replies)
I have the two class definition as follows.
class A { public: int a; };
class B : virtual public A{ };
The size of class A is shown as 4, and size of class B is shown as 16. Why is this effect ?. (2 Replies)
I need help with a tcl code. I have a variable "myIP" which reads IP address from socket. How do I use regex to find out if it belongs to a group for e.g., 50.65.75.240/28 or 50.65.75.128/25 etc. (2 Replies)
I have a class
and want to print values in MOD using
L = new Layer* ;
How can I print the values in MOD using this object L???
class Layer
{
public :
Model* MODP;
Model* MODS; (1 Reply)
Hello All,
I am a learner in C++. I was testing my inheritance knowledge with following piece of code.
#include <iostream>
using namespace std;
class base
{
public :
void display()
{
cout << "In base display()" << endl;
}
void display(int k)
{... (2 Replies)
Discussion started by: anand.shah
2 Replies
LEARN ABOUT DEBIAN
pydhcplib.ipv4
pydhcplib.ipv4(3) PYDHCPLIB pydhcplib.ipv4(3)NAME
pydhcplib.ipv4 - Type for IP addresses version 4
SYNOPSIS
from pydhcplib.type_ipv4 import ipv4
a = ipv4()
a = ipv4(string)
a = ipv4(strlist)
a = ipv4(int)
DESCRIPTION
The class pydhcplib.ipv4 is a type "IP address version 4". It's used for string processing like "192.168.0.4".
The class creation argument can be a string like "192.168.0.4".
The class creation argument can be a list of bytes like [192,168,0,4].
METHODS
The implemented methods in this class are mostly methods of comparison (= =, >, etc...)
else :
str() return data converted into a printable string.
list() return data converted into a list of bytes.
int() return data converted into an 4 bytes int.
EXAMPLES
Example program ipv4_example.py :
from pydhcplib.type_ipv4 import ipv4
address = ipv4()
address1 = ipv4("192.168.0.1")
address2 = ipv4("10.0.0.1")
address3 = ipv4([192,168,0,1])
print "a0 : ",address
print "a1 : ",address1
print "a2 : ",address2
print "a3 : ",address3
if address1 == address2 :
print "test 1 : ",address1, "==",address2
else :
print "test 1 : " ,address1, "!=",address2
if address1 == address3 :
print "test 2 : ", address1, "==",address3
else :
print "test 2 : ", address1, "!=",address3
SEE ALSO pydhcp(8), pydhcplib.hwmac(3), pydhcplib.ipv4(3), pydhcplib.strlist(3), pydhcplib.DhcpPacket(3), pydhcplib.DhcpBasicPacket(3), pydhc-
plib.DhcpNetwork(3), pydhcplib.DhcpClient(3), pydhcplib.DhcpRawClient(3), pydhcplib.DhcpDerver(3)BUGS
See http://pydhcplib.tuxfamily.org/ for more information.
AUTHOR
Mathieu Ignacio (mignacio[AT]april.org)
pydhcplib.ipv4(3)