Re: creating RAW sockets

2011-03-17 Thread moijes12
On Mar 18, 6:20 am, Nobody wrote: > On Wed, 16 Mar 2011 23:50:03 -0700, moijes12 wrote: > > Now,please can someone guide(as in what should I read and NOT as in > > give me the code) me in decoding the IP header of packets using python > > 3.0.1. > > The "struct" module is the usual approach for de

Re: creating RAW sockets

2011-03-17 Thread Nobody
On Wed, 16 Mar 2011 23:50:03 -0700, moijes12 wrote: > Now,please can someone guide(as in what should I read and NOT as in > give me the code) me in decoding the IP header of packets using python > 3.0.1. The "struct" module is the usual approach for decoding binary data structures. Fields which a

Re: creating RAW sockets

2011-03-16 Thread moijes12
On Mar 17, 11:28 am, moijes12 wrote: > On Mar 17, 11:14 am, Nobody wrote: > > > On Wed, 16 Mar 2011 22:36:07 -0700, moijes12 wrote: > > > Traceback (most recent call last): > > >   File "getsockopt_handler.py", line 7, in ? > > >     send.bind((gethostbyname(gethostname()),5)) > > > socket.er

Re: creating RAW sockets

2011-03-16 Thread moijes12
On Mar 17, 11:14 am, Nobody wrote: > On Wed, 16 Mar 2011 22:36:07 -0700, moijes12 wrote: > > Traceback (most recent call last): > >   File "getsockopt_handler.py", line 7, in ? > >     send.bind((gethostbyname(gethostname()),5)) > > socket.error: (99, 'Cannot assign requested address') > > Spe

Re: creating RAW sockets

2011-03-16 Thread Nobody
On Wed, 16 Mar 2011 22:36:07 -0700, moijes12 wrote: > Traceback (most recent call last): > File "getsockopt_handler.py", line 7, in ? > send.bind((gethostbyname(gethostname()),5)) > socket.error: (99, 'Cannot assign requested address') Specifying a port number isn't meaningful for a raw

Re: creating RAW sockets

2011-03-16 Thread Chris Rebert
On Wed, Mar 16, 2011 at 10:36 PM, moijes12 wrote: > Hi > > I am unable to create RAW sockets using python. > > Traceback (most recent call last): >  File "getsockopt_handler.py", line 6, in ? >    send = socket(AF_INET,SOCK_RAW,IPPROTO_IP) > socket.error: (94, 'Socket type not supported') > > I've