low level ethernet device access in linux



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
.



Relevant Pages

  • Re: low level ethernet device access in linux
    ... the application as a user and not as root. ... socket without running the app. ... $ man capabilities ...
    (comp.lang.python)
  • Re: Dependency tracking application
    ... this with a regular dimension or parent-child ... required to actively Use the app. ... An app cannot exist sans a server. ... Baring that, I think the server would be at the root, and the apps ...
    (microsoft.public.sqlserver.olap)
  • Re[2]: accounting with ipfw (gid, uid riles)
    ... MS> The uid associated with a socket is the uid of the process which created ... it's still accounted to root. ... far, is adding alias interface, bind squid to this interface and count ...
    (FreeBSD-Security)
  • Re: Converting ASP site to .NET
    ... you limit how and where your app ... > Previously I had my server set up so that the root folder of my web was ... > So I changed IIS to use "wwwroot" as my home directory and using VS ... > Should I just replace my absolute paths with relative paths? ...
    (microsoft.public.dotnet.general)
  • Re: Async Socket IO Question
    ... I think you're mostly bumping into Socket Timeout issues. ... If you kill the process of your client app, the TCP session isn't cleanly ... When your server sends to the client app, that send happens just fine (the ...
    (microsoft.public.dotnet.framework)