Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

low level ethernet device access in linux


  • From: brown at esteem.com (Tom Brown)
  • Subject: low level ethernet device access in linux
  • Date: Fri, 31 Aug 2007 10:14:29 -0700

Hi,

I have a windows application, written in delphi, that communicates to our 
devices using raw ethernet frames. I am trying to port this application to 
linux using python. However, when I try to open a socket, I get this error:

  File "/home/tbrown/projects/discovery/trunk/comm.py", line 9, in __init__
    self.s = socket(AF_PACKET, SOCK_RAW, proto)
  File "/usr/local/lib/python2.5/socket.py", line 156, in __init__
    _sock = _realsocket(family, type, proto)
socket.error: (1, 'Operation not permitted')

I understand that I am getting this error because I am running the application 
as a user and not as root. I would like to be able to run this app. as a 
user. Is there a way to create a socket without running the app. as root or 
sudo? When I run the app. as root I get this error:

discovery.py: cannot connect to X server

Thanks,
Tom