Ethernet library and LLDP

General discussion on mikroBasic PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
peterverkaik
Posts: 174
Joined: 31 Aug 2009 22:44

Ethernet library and LLDP

#1 Post by peterverkaik » 12 Apr 2012 12:00

Hi,

I need to transmit LLDP packets.

An LLDP packet is framed like this

Code: Select all

Frame Encapsulation 
An LLDP PDU is encapsulated within an 802 frame that cooresponds to frame
formatted to meet the requirements of an 802 Slow Protocol as defined by Std
802.3, 2000 Edition, Annex 43B. The format is shown in the following figure:

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Slow Protocols Multicast DA |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Multicast DA (cont) | Station SA |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Station SA (cont) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Slow Protocols Type | Subtype | reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LLDP PDU Message |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
[ figure 1 – Slow Protocols LLDP Message Format ]
The Slow Protocol encapsulation has the following fields:
Slow Protocols Multicast DA
The Slow Protocols Multicast destination address is 01-80-C2-00-00-02.
This address is within the range reserved by ISO/IEC 15802-3 (MAC Bridges)
for link-constrained protocols and will not be forwarded by conformant MAC
bridges.

Station SA
The source MAC address of the sending station

Slow Protocols Type
The Slow Protocols Type field encoding of the Length/Type field is 88-09

Subtype
The Slow Protocols Subtype field is TBD
All reserved fields shall be set to zero.

How can I send a packet to destination mac address
01-80-C2-00-00-02

The ethernet library only provides SendUDP which takes a destination ip address.

regards peter

Post Reply

Return to “mikroBasic PRO for dsPIC30/33 and PIC24 General”