mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Adding lldp.json to the simulator
Moving the global on/off onto the LLDP page Building a table of LLDP status from the S ports. Later on, if we wish to implement an lldp receiver we can display the remote details here Adding support to the cmd parser for the lldp commands
This commit is contained in:
1 parent
4f1a2f04d8
commit
58fd1a3ccc
9 files changed
+100
-20
No files matched your search
+3
-3
@@ -14,7 +14,7 @@ extern __xdata bool lldp_enabled;
|
||||
extern __code const struct machine machine;
|
||||
|
||||
__xdata uint8_t lldp_seconds;
|
||||
__xdata uint16_t lldp_port_status = 0xffff;
|
||||
__xdata uint16_t lldp_physical_port_status = 0xffff;
|
||||
|
||||
void lldp_init(void) __banked
|
||||
{
|
||||
@@ -110,9 +110,9 @@ void lldp_send(void) __banked __reentrant
|
||||
|
||||
for (uint8_t port = machine.min_port; port <= machine.max_port; port++) {
|
||||
|
||||
if ((1 << machine.log_to_phys_port[port]) & lldp_port_status) {
|
||||
if ((1 << machine.log_to_phys_port[port]) & lldp_physical_port_status) {
|
||||
LLDP_O->payload[port_position] = '0' + machine.log_to_phys_port[port];
|
||||
LLDP_O->rtl_tag.pmask = HTONS((uint16_t)1 << port);
|
||||
LLDP_O->rtl_tag.pmask = HTONS((uint16_t)1 << machine.log_to_phys_port[port]);
|
||||
|
||||
tcpip_output();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user