Skip to content

Commit

Permalink
[nes]: ETHERNET changes ...
Browse files Browse the repository at this point in the history
  • Loading branch information
nes-repo committed Mar 5, 2015
1 parent bd04874 commit 15e4a05
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ethernet/ethernetUtils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,20 @@ ieee8021QBridgePortRowStatus_halUpdate (
return bRetCode;
}

bool
ieee8021QBridgeIngressVidXRowStatus_update (
ieee8021BridgeBaseEntry_t *poComponent,
ieee8021QBridgeIngressVidXEntry_t *poEntry, uint8_t u8RowStatus)
{
register bool bRetCode = false;

bRetCode = true;

//ieee8021QBridgeIngressVidXRowStatus_update_cleanup:

return bRetCode;
}



#endif // __ETHERNET_UTILS_C__
4 changes: 4 additions & 0 deletions ethernet/ethernetUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ bool
ieee8021QBridgePortRowStatus_update (
ieee8021BridgeBaseEntry_t *poComponent,
ieee8021QBridgePortEntry_t *poEntry, uint8_t u8RowStatus);
bool
ieee8021QBridgeIngressVidXRowStatus_update (
ieee8021BridgeBaseEntry_t *poComponent,
ieee8021QBridgeIngressVidXEntry_t *poEntry, uint8_t u8RowStatus);



Expand Down
77 changes: 77 additions & 0 deletions ethernet/ieee8021QBridgeMib.c
Original file line number Diff line number Diff line change
Expand Up @@ -8710,6 +8710,83 @@ ieee8021QBridgeIngressVidXTable_removeEntry (ieee8021QBridgeIngressVidXEntry_t *
return;
}

bool
ieee8021QBridgeIngressVidXRowStatus_handler (
ieee8021QBridgeIngressVidXEntry_t *poEntry, uint8_t u8RowStatus)
{
register bool bRetCode = false;
register uint8_t u8RealStatus = u8RowStatus & xRowStatus_mask_c;
register ieee8021BridgeBaseEntry_t *poIeee8021BridgeBaseEntry = NULL;

if ((poIeee8021BridgeBaseEntry = ieee8021BridgeBaseTable_getByIndex (poEntry->u32BridgeBasePortComponentId)) == NULL)
{
goto ieee8021QBridgeIngressVidXRowStatus_handler_cleanup;
}

if (poEntry->u8RowStatus == u8RealStatus)
{
goto ieee8021QBridgeIngressVidXRowStatus_handler_success;
}
if (u8RowStatus & xRowStatus_fromParent_c &&
((u8RealStatus == xRowStatus_active_c && poEntry->u8RowStatus != xRowStatus_notReady_c) ||
(u8RealStatus == xRowStatus_notInService_c && poEntry->u8RowStatus != xRowStatus_active_c)))
{
goto ieee8021QBridgeIngressVidXRowStatus_handler_success;
}


switch (u8RealStatus)
{
case xRowStatus_active_c:
if (!(u8RowStatus & xRowStatus_fromParent_c) && poIeee8021BridgeBaseEntry->u8RowStatus != xRowStatus_active_c)
{
u8RealStatus = xRowStatus_notReady_c;
}

if (!ieee8021QBridgeIngressVidXRowStatus_update (poIeee8021BridgeBaseEntry, poEntry, u8RealStatus))
{
goto ieee8021QBridgeIngressVidXRowStatus_handler_cleanup;
}

poEntry->u8RowStatus = u8RealStatus;
break;

case xRowStatus_notInService_c:
if (!ieee8021QBridgeIngressVidXRowStatus_update (poIeee8021BridgeBaseEntry, poEntry, u8RealStatus))
{
goto ieee8021QBridgeIngressVidXRowStatus_handler_cleanup;
}

poEntry->u8RowStatus =
poEntry->u8RowStatus == xRowStatus_active_c && (u8RowStatus & xRowStatus_fromParent_c) ? xRowStatus_notReady_c: xRowStatus_notInService_c;
break;

case xRowStatus_createAndGo_c:
goto ieee8021QBridgeIngressVidXRowStatus_handler_cleanup;

case xRowStatus_createAndWait_c:
poEntry->u8RowStatus = xRowStatus_notInService_c;
break;

case xRowStatus_destroy_c:
if (!ieee8021QBridgeIngressVidXRowStatus_update (poIeee8021BridgeBaseEntry, poEntry, u8RealStatus))
{
goto ieee8021QBridgeIngressVidXRowStatus_handler_cleanup;
}

poEntry->u8RowStatus = xRowStatus_notInService_c;
break;
}

ieee8021QBridgeIngressVidXRowStatus_handler_success:

bRetCode = true;

ieee8021QBridgeIngressVidXRowStatus_handler_cleanup:

return bRetCode || (u8RowStatus & xRowStatus_fromParent_c);
}

/* example iterator hook routines - using 'getNext' to do most of the work */
netsnmp_variable_list *
ieee8021QBridgeIngressVidXTable_getFirst (
Expand Down
2 changes: 2 additions & 0 deletions ethernet/ieee8021QBridgeMib.h
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,8 @@ ieee8021QBridgeIngressVidXEntry_t * ieee8021QBridgeIngressVidXTable_getNextIndex
uint32_t u32BridgeBasePort,
uint32_t u32LocalVid);
void ieee8021QBridgeIngressVidXTable_removeEntry (ieee8021QBridgeIngressVidXEntry_t *poEntry);
bool ieee8021QBridgeIngressVidXRowStatus_handler (
ieee8021QBridgeIngressVidXEntry_t *poEntry, uint8_t u8RowStatus);
#ifdef SNMP_SRC
Netsnmp_First_Data_Point ieee8021QBridgeIngressVidXTable_getFirst;
Netsnmp_Next_Data_Point ieee8021QBridgeIngressVidXTable_getNext;
Expand Down

0 comments on commit 15e4a05

Please sign in to comment.