Networking Forums

Networking Forums > Computer Networking > Linux Networking > application to receive ethernet|IP|UDP a ethernet|ppp|IP|UDP packages over socket

Reply
Thread Tools Display Modes

application to receive ethernet|IP|UDP a ethernet|ppp|IP|UDP packages over socket

 
 
Andreas
Guest
Posts: n/a

 
      06-07-2004, 03:24 AM
Hello Everyone

I am working on a ADSL modem and have the following situation that I
would like to have some advice one.

My ADSL modem runs on Monta Vista Linux and comes in 2 models; Bridge
and a Router and my question concerns the Bridge.

To monitor the status of the ADSL modem we have an application(host
application) running on a PC/MAC that requests data of the modems
status from a control application that runs on the ADSL modem. When
the host application sends out a request it is in the form of a
broadcast using IP/UDP packet based upon a UDP socket setup. Now my
problem is when the ADSL modem is a bridge and host runs a PPPoE
client to encapsulate the data so that the ISP can receive it. When
having a setup like this a Windows machine sends out 2 packages when
the host application does a broadcast for status of the modem. One
packet is pure: ethernet|IP|UDP while the other one is
ethernet|ppp|IP|UDP and my application only picks up one packet which
is ethernet|IP|UDP and while the one containing ppp gets lost. Since
the 2 packages contains the same request for information its not such
a big deal under Windows. However when running this setup on a MAC
only 1 packet gets sent out from the host application:
ethernet|ppp|IP|UDP and this in NOT received by my control
application(its a UDP socket) and no data is sent back to the host
application.

After the "history" lesson I move onto my questions:
How do I setup a socket on the control application that can receive
both types of packages: ethernet|IP|UDP and a ethernet|ppp|IP|UDP

One option is to have a RAW Ethernet socket:
sock = socket(AF_INET,SOCK_RAW,htons(ETH_P_ALL));
This would collect ALL Ethernet frames and since this is a ADSL modem
there will be quite few of them. I would have to spend a lot of CPU
time looking for my control frames(they have a ID in the UDP data so
it can be done). I do not feel that this solution is the best but an
option that I am exploring.

I have also tried to set up a RAW IP/UDP socket:
sock = socket(AF_INET,SOCK_RAW,IPPROTO_UDP);
However this socket did only collect the IP/UDP and threw away the PPP
packages as it should do

So what I am looking for is like a middle way between RAW Ethernet and
RAW IP/UDP, I want my control application to receive 2 types of
packages: ethernet|IP|UDP and ethernet|ppp|IP|UDP.

Any advice or input would be greatly appreciated.

Regards
Andreas
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Raw ethernet socket InuY4sha Linux Networking 1 07-16-2007 04:02 PM
broadband wireless router - ethernet socket - adsl modem? Willie Webster\(WW\) Windows Networking 2 03-28-2005 09:03 PM
How to get my local ethernet ip on which i receive a socket data?? kernel.lover Linux Networking 1 03-22-2005 08:41 AM
Need help! Raw ethernet socket question Michael Mueller Linux Networking 2 10-07-2003 11:18 AM
Raw Ethernet Socket programming Andrew Mehrtens Linux Networking 1 09-30-2003 09:03 PM



1 2 3 4 5 6 7 8 9 10 11