Re: Q: Extract hardware address from received datagram?

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

 



On Mon, 15 Aug 2005 17:14:42 +0000
Albrecht Dreß <albrecht.dress@xxxxxxxx> wrote:

> Am 15.08.05 12:14 schrieb(en) Henrik Nordstrom:
> > Why is the link layer important at all in the protocol if the packet is  
> > an UDP/IP (PF_INET,SOCK_DGRAM) packet?
> 
> Due to this crazy protocol: the MAC addresses are used as some kind of  
> "authentication". In the *reply* udp packet data, the micro adds its own  
> mac and the mac of the requesting machine retreived from the incoming  
> packet. The other end is a winbloze app which apparently uses the two  
> mac's to determine whether the packet should be handles or not. It  
> obvoisly had the same problems to determine the source mac, so it's  
> encoded properly in the reply, but not in the request...
> 
> I know this protocol is really broken, but unfortunately I must keep  
> compatibility. Sigh!
> 
> Thaks a lot for your suggestions,
> cheers,
> 
> Albrecht.

Since you need access to the whole packet, don't use a UDP socket
but instead AF_PACKET. You will need to decode/encode the whole
UDP/IP headers but that is relatively easy.
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux