#include <stdlib.h>
#include <unistd.h>
#include "rpcclt_openapi.h"
#include "proc_util.h"
static void printAppMenu(char *name)
{
printf("Usage: %s <test#> <arg1> <arg2> ... \n", name);
printf("Test 1: Get the 802.1AS global admin mode: %s 1 \n", name);
printf("Test 2: Set the 802.1AS global admin mode: %s 2 <adminMode(0-disable,1-enable)>\n", name);
printf("Test 3: Check if there is a Grand Master elected in the 802.1AS domain: %s 3 \n", name);
printf("Test 4: Check if this bridge is capable of being a grandmaster: %s 4 \n", name);
printf("Test 5: Get the Best clock identity as detected by 802.1AS protocol: %s 5 \n", name);
printf("Test 6: Get the priority1/2 value of Best clock in the 802.1AS domain: %s 6 <clockPriorityType(0-priority 1,1- priority 2)>\n", name);
printf("Test 7: Get the steps to Best clock as detected by 802.1AS protocol: %s 7 \n", name);
printf("Test 8: Get the local clock identity of this bridge: %s 8 \n",name);
printf("Test 9: Get the priority1/2 value of the local clock: %s 9 <clockPriorityType(0-priority 1,1- priority 2)>\n", name);
printf("Test 10: Set the priority1/2 value of the local clock: %s 10 <clockPriorityType(0-priority 1,1- priority 2)> <clockPriority>\n", name);
printf("Test 11: Get the number of times the grandmaster has changed: %s 11\n", name);
printf("Test 12: Get the timestamp of the given event: %s 12 <gmEventType(0-GM change event,1-GM phase change,2-GM frequency change)>\n", name);
printf("Test 13: Get the 802.1AS admin mode for the given interface: %s 13 <intfNum>\n", name);
printf("Test 14: Set the 802.1AS admin mode for the given interface: %s 14 <intfNum> <adminMode(0-disable,1-enable)>\n", name);
printf("Test 15: Check if the given interface is 802.1AS capable (as determined by the peer delay mechanism: %s 15 <intfNum>\n", name);
printf("Test 16: Get the peer delay measuring status, which is set to TRUE if the given interface is receiving PDELAY response messages from other end of the link: %s 16 <intfNum>\n", name);
printf("Test 17: Get the propagation delay on the given interface: %s 17 <intfNum>\n", name);
printf("Test 18: Get the 802.1AS role of the given interface: %s 18 <intfNum>\n", name);
printf("Test 19: Get the propagation delay threshold on the given interface: %s 19 <intfNum>\n", name);
printf("Test 20: Set the propagation delay threshold on the given interface: %s 20 <intfNum> <threshold>\n", name);
printf("Test 21: Get the number of lost peer delay request messages allowed.: %s 21 <intfNum>\n", name);
printf("Test 22: Set the number of lost peer delay request messages allowed: %s 22 <intfNum> <numAllowedLostResp>\n", name);
printf("Test 23: Get the neighbor rate ratio on the given interface (as computed by the pdelay mechanism) (extensible version): %s 23 <intfNum>\n", name);
printf("Test 24: Get the given interval on the given interface: %s 24 <intfNum> <intervalType>\n", name);
printf("Test 25: Set the given interval on the given interface: %s 25 <intfNum> <intervalType> <interval>\n", name);
printf("Test 26: Get the requested 802.1AS counter for the given interface: %s 26 <intfNum> <counterType>\n", name);
printf("Test 27: Reset 802.1AS counters for the given interface: %s 27 <intfNum>\n", name);
printf("Test 28: Run API sanity checks: %s 28 \n", name);
return;
}
{
uint32_t pDelay;
uint32_t numAllowedLostResp;
uint32_t rateRatio;
uint32_t counterValue;
uint32_t threshold;
uint32_t timeStamp;
uint32_t gmChangeCount;
uint32_t intfNum;
uint16_t bestClkSteps;
OPEN_DOT1AS_GM_EVENT_TYPE_t gmEventType;
OPEN_DOT1AS_INTF_INTERVAL_t intervalType;
int32_t interval;
OPEN_DOT1AS_COUNTER_TYPE_t counterType;
uint32_t clockPriority;
printf("Testing dot1as OpEN APIs sanity:\n");
printf("Testing openapiDot1asModeGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 2:(result = %d)\n", result);
printf("Testing openapiDot1asIsGrandmasterPresentGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 2:(result = %d)\n", result);
printf("Testing openapiDot1asGrandmasterCapableGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 2:(result = %d)\n", result);
printf("Testing openapiDot1asBestClkIdGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 2:(result = %d)\n", result);
printf("Testing openapiDot1asBestClkPriorityGet():\n");
clockPriorityType = 0;
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asBestClkStepsGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 2:(result = %d)\n", result);
printf("Testing openapiDot1asBridgeClkIdGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 2:(result = %d)\n", result);
printf("Testing openapiDot1asBridgePriorityGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asGrandmasterChangeCountGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 2:(result = %d)\n", result);
printf("Testing openapiDot1asEventTimestampGet():\n");
gmEventType = 0;
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asIntfModeGet():\n");
intfNum = 0;
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asIntfIsCapableGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asIntfIsMeasuringPdelayGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asIntfPdelayGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asIntfRoleGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asIntfPdelayThresholdGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asIntfAllowedLostRespGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asIntfNeighborRateRatioGet():\n");
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 3:(result = %d)\n", result);
printf("Testing openapiDot1asIntfIntervalGet():\n");
intervalType = 0;
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 4:(result = %d)\n", result);
printf("Testing openapiDot1asIntfStatsGet():\n");
counterType = 1;
printf("NULL client handle:(result = %d)\n", result);
printf("NULL argument 4:(result = %d)\n", result);
return;
}
{
char enableDisableStr[16] = "disabled";
{
printf("Bad return code trying to get the 802.1AS global admin mode. (result = %d)\n", result);
}
else
{
{
snprintf(enableDisableStr, sizeof(enableDisableStr), "enabled");
}
printf("802.1AS global admin mode is %s\n",enableDisableStr);
}
return;
}
{
{
printf("Bad return code trying to set the 802.1AS global admin mode. (result = %d)\n", result);
}
else
{
printf("802.1AS global admin mode is set. (result = %d)\n", result);
}
return;
}
{
{
printf("Bad return code trying to check if there is a Grand Master elected in the 802.1AS domain. (result = %d)\n", result);
}
else
{
{
printf("Grand master is not present \n");
}
else
{
printf("Grand master is present \n");
}
}
return;
}
{
{
printf("Bad return code trying to check if this bridge is capable of being a grandmaster. (result = %d)\n", result);
}
else
{
{
printf("Not grand master capable\n");
}
else
{
printf("Grand master capable\n");
}
}
return;
}
{
{
printf("Bad return code trying to get the Best clock identity as detected by this 801AS protocol. (result = %d)\n", result);
}
else
{
printf("Best clock id is : %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
bestClockId->
id[0], bestClockId->id[1],
bestClockId->id[2], bestClockId->id[3],
bestClockId->id[4], bestClockId->id[5],
bestClockId->id[6], bestClockId->id[7]);
}
return;
}
uint8_t *clockPriority)
{
{
printf("Bad return code trying to get the priority1/2 value of Best clock in the 802.1AS domain. (result = %d)\n", result);
}
else
{
printf("Best clock priority%d is %d\n",
clockPriorityType+1, *clockPriority);
}
return;
}
uint16_t *bestClkSteps)
{
{
printf("Bad return code trying to get the steps to Best clock as detected by this protocol. (result = %d)\n", result);
}
else
{
printf("Steps to best clock %d\n", *bestClkSteps);
}
return;
}
{
{
printf("Bad return code trying to get the clock identity of this bridge. (result = %d)\n", result);
}
else
{
printf("Local clock id is : %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X",
bridgeClkId->id[0], bridgeClkId->id[1],
bridgeClkId->id[2], bridgeClkId->id[3],
bridgeClkId->id[4], bridgeClkId->id[5],
bridgeClkId->id[6], bridgeClkId->id[7]);
}
return;
}
uint32_t *clockPriority)
{
{
printf("Bad return code trying to get the priority1/2 value of the local clock. (result = %d)\n", result);
}
else
{
printf("Local clock priority%d is %d\n", clockPriorityType+1, *clockPriority);
}
return;
}
uint32_t clockPriority)
{
{
printf("Bad return code trying to set the priority1/2 value of the local clock. (result = %d)\n", result);
}
else
{
printf("Local clock priority is set.\n");
}
return;
}
uint32_t *gmChangeCount)
{
{
printf("Bad return code trying to get the number of times the grandmaster has changed. (result = %d)\n", result);
}
else
{
printf("Grand master change count is %d\n", *gmChangeCount);
}
return;
}
OPEN_DOT1AS_GM_EVENT_TYPE_t gmEventType,
uint32_t *timeStamp)
{
{
printf("Bad return code trying to get the timestamp of the given event. (result = %d)\n", result);
}
else
{
printf("802.1AS event timestamp is %d\n", *timeStamp);
}
return;
}
{
char enableDisableStr[16] = "disabled";
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to get the 802.1AS admin mode for the given interface. (result = %d)\n", result);
}
else
{
{
snprintf(enableDisableStr, sizeof(enableDisableStr), "enabled");
}
printf("\n Name is %s\n",bufIntfName);
printf("On interface %d (interface name %s) 802.1AS admin mode is %s\n",
intfNum, (
char *)bufdName.
pstart, enableDisableStr);
}
return;
}
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to set the 802.1AS admin mode for the given interface. (result = %d)\n", result);
}
else
{
printf("On interface %d (interface name %s) 802.1AS admin mode is set\n",
intfNum, (char *)bufdName.pstart);
}
return;
}
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to check if the given interface 802.1AS capable (as determined by the peer delay mechanism. (result = %d)\n", result);
}
else
{
{
printf("Interface %d (interface name %s) is 802.1AS capable.\n",
intfNum, (char *)bufdName.pstart);
}
else
{
printf("Interface %d (interface name %s) is not 802.1AS capable.\n",
intfNum, (char *)bufdName.pstart);
}
}
return;
}
uint32_t intfNum,
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to get the status of peer delay measuing.(result = %d)\n", result);
}
else
{
{
printf("Interface %d (interface name %s) is measuring peer delay.\n",
intfNum, (char *)bufdName.pstart);
}
else
{
printf("Interface %d (interface name %s) is not measuring peer delay.\n",
intfNum, (char *)bufdName.pstart);
}
}
return;
}
uint32_t intfNum, uint32_t *pDelay)
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to get the propagation delay on the given interface. (result = %d)\n", result);
}
else
{
printf("Interface %d (interface name %s) Propogation delay %d.\n",
intfNum, (char *)bufdName.pstart, *pDelay);
}
return;
}
uint32_t intfNum,
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to get the 802.1AS role of the given interface. (result = %d)\n", result);
}
else
{
printf("Interface %d (interface name %s) 802.1AS Role is %d.\n",
intfNum, (char *)bufdName.pstart, *intfRole);
}
return;
}
uint32_t intfNum, uint32_t *threshold)
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to get the propagation delay threshold on the given interface. (result = %d)\n", result);
}
else
{
printf("Interface %d (interface name %s) Propogation delay threshold %d.\n",
intfNum, (char *)bufdName.pstart, *threshold);
}
return;
}
uint32_t intfNum, uint32_t threshold)
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to set the propagation delay threshold on the given interface. (result = %d)\n", result);
}
else
{
printf("On interface %d (interface name %s) Propogation delay threshold is set.\n", intfNum, (char *)bufdName.pstart);
}
return;
}
uint32_t intfNum, uint32_t *numAllowedLostResp)
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to get the number of PDELAY lost responses allowed. (result = %d)\n", result);
}
else
{
printf("On interface %d (interface name %s) PDELAY lost responses allowed %u.\n", intfNum, (char *)bufdName.pstart, *numAllowedLostResp);
}
return;
}
void dot1asIntfAllowedLostRespSet(
openapiClientHandle_t *client_handle, uint32_t intfNum, uint32_t numAllowedLostResp)
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to set the number of PDELAY lost responses allowed. (result = %d)\n", result);
}
else
{
printf("On interface %d (interface name %s) PDELAY lost responses allowed is set.\n", intfNum, (char *)bufdName.pstart);
}
return;
}
uint32_t intfNum, uint32_t *rateRatio)
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to get the neighbor rate ratio on the given interface (as computed by the pdelay mechanism) (extensible version). (result = %d)\n", result);
}
else
{
printf("On interface %d (interface name %s) Neighbour rate ratio %d.\n", intfNum, (char *)bufdName.pstart, *rateRatio);
}
return;
}
uint32_t intfNum,
OPEN_DOT1AS_INTF_INTERVAL_t intervalType,
int32_t *interval)
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to get the given interval on the given interface. (result = %d)\n", result);
}
else
{
printf("On interface %d (interface name %s) interval of type %d is %d.\n", intfNum,(char *)bufdName.pstart, intervalType, *interval);
}
return;
}
uint32_t intfNum,
OPEN_DOT1AS_INTF_INTERVAL_t intervalType,
int32_t interval)
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to set the given interval on the given interface. (result = %d)\n", result);
}
else
{
printf("On interface %d (interface name %s) interval is set.\n", intfNum, (char *)bufdName.pstart);
}
return;
}
uint32_t intfNum,
OPEN_DOT1AS_COUNTER_TYPE_t counterType,
uint32_t *counterValue)
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to get the requested 802.1AS counter for the given interface. (result = %d)\n", result);
}
else
{
printf("On interface %d (interface name %s) stats value %u.\n",
intfNum, (char *)bufdName.pstart, *counterValue);
}
return;
}
{
uint8_t bufIntfName[OPEN_INTF_NAME_MAX_LENGTH] = {0};
{
printf("Invalid interface number %d. (result = %d)\n", intfNum, result);
return;
}
{
printf("Bad return code trying to reset 802.1AS counters for the given interface. (result = %d)\n", result);
}
else
{
printf("On interface %d (interface name %s) counters are reset.\n",
intfNum, (char *)bufdName.pstart);
}
return;
}
int main(int argc, char **argv)
{
uint32_t testNum;
char switch_os_revision_string[100];
int show_help = 1;
uint32_t pDelay;
uint32_t numAllowedLostResp;
uint32_t rateRatio;
uint32_t counterValue;
uint32_t threshold;
uint32_t timeStamp;
uint32_t gmChangeCount;
uint32_t intfNum;
uint16_t bestClkSteps;
OPEN_DOT1AS_GM_EVENT_TYPE_t gmEventType;
OPEN_DOT1AS_INTF_INTERVAL_t intervalType;
int32_t interval;
OPEN_DOT1AS_COUNTER_TYPE_t counterType;
uint32_t clockPriority;
if (argc < 2)
{
printAppMenu(argv[0]);
return -1;
}
testNum = atoi(argv[1]);
l7proc_crashlog_register();
{
printf("\nFailed to initialize RPC to OpEN. Exiting (result = %d)\n", result);
return -1;
}
{
sleep(1);
}
L7PROC_LOGF(L7PROC_LOG_SEVERITY_INFO, 0, "Starting dot1as API example application");
printf("\n");
switch_os_revision.pstart = switch_os_revision_string;
switch_os_revision.
size =
sizeof(switch_os_revision_string);
printf("Network OS version = %s\n", switch_os_revision_string);
else
printf("Network OS version retrieve error\n");
printf("\n");
switch (testNum)
{
case 1:
if (argc == 2)
{
dot1asModeGet(&client_handle, &adminMode);
show_help = 0;
}
break;
case 2:
if (argc == 3)
{
show_help = 1;
if (argv[2][0] == '0' || argv[2][0]=='1')
{
adminMode = atoi(argv[2]);
dot1asModeSet(&client_handle, adminMode);
show_help = 0;
}
}
break;
case 3:
if (argc == 2)
{
dot1asIsGrandmasterPresentGet(&client_handle, &grandmasterPresent);
show_help = 0;
}
break;
case 4:
if (argc == 2)
{
dot1asGrandmasterCapableGet(&client_handle, &grandmasterCapable);
show_help = 0;
}
break;
case 5:
if (argc == 2)
{
dot1asBestClkIdGet(&client_handle, &bestClockId);
show_help = 0;
}
break;
case 6:
if (argc == 3)
{
show_help = 1;
if (argv[2][0] == '0' || argv[2][0]=='1')
{
clockPriorityType = atoi(argv[2]);
dot1asBestClkPriorityGet(&client_handle, clockPriorityType, &clockPriority);
show_help = 0;
}
}
break;
case 7:
if (argc == 2)
{
dot1asBestClkStepsGet(&client_handle, &bestClkSteps);
show_help = 0;
}
break;
case 8:
if (argc == 2)
{
dot1asBridgeClkIdGet(&client_handle, &bridgeClkId);
show_help = 0;
}
break;
case 9:
if (argc == 3)
{
show_help = 1;
if (argv[2][0] == '0' || argv[2][0]=='1')
{
clockPriorityType = atoi(argv[2]);
dot1asBridgePriorityGet(&client_handle, clockPriorityType, &clockPriority);
show_help = 0;
}
}
break;
case 10:
if (argc == 4)
{
show_help = 1;
if (argv[2][0] == '0' || argv[2][0]=='1')
{
clockPriorityType = atoi(argv[2]);
clockPriority = atoi(argv[3]);
dot1asBridgePrioritySet(&client_handle, clockPriorityType, clockPriority);
show_help = 0;
}
}
break;
case 11:
if (argc == 2)
{
dot1asGrandmasterChangeCountGet(&client_handle, &gmChangeCount);
show_help = 0;
}
break;
case 12:
if (argc == 3)
{
show_help = 1;
if (argv[2][0] == '0' || argv[2][0]=='1' || argv[2][0]=='2')
{
gmEventType = atoi(argv[2]);
dot1asEventTimestampGet(&client_handle, gmEventType, &timeStamp);
show_help = 0;
}
}
break;
case 13:
if (argc == 3)
{
intfNum = atoi(argv[2]);
dot1asIntfModeGet(&client_handle, intfNum, &adminMode);
show_help = 0;
}
break;
case 14:
if (argc == 4)
{
intfNum = atoi(argv[2]);
adminMode = atoi(argv[3]);
dot1asIntfModeSet(&client_handle, intfNum, adminMode);
show_help = 0;
}
break;
case 15:
if (argc == 3)
{
intfNum = atoi(argv[2]);
dot1asIntfIsCapableGet(&client_handle, intfNum, &isCapable);
show_help = 0;
}
break;
case 16:
if (argc == 3)
{
intfNum = atoi(argv[2]);
dot1asIntfIsMeasuringPdelayGet(&client_handle, intfNum, &isMeasuringPdelay);
show_help = 0;
}
break;
case 17:
if (argc == 3)
{
intfNum = atoi(argv[2]);
dot1asIntfPdelayGet(&client_handle, intfNum, &pDelay);
show_help = 0;
}
break;
case 18:
if (argc == 3)
{
intfNum = atoi(argv[2]);
dot1asIntfRoleGet(&client_handle, intfNum, &intfRole);
show_help = 0;
}
break;
case 19:
if (argc == 3)
{
intfNum = atoi(argv[2]);
dot1asIntfPdelayThresholdGet(&client_handle, intfNum, &threshold);
show_help = 0;
}
break;
case 20:
if (argc == 4)
{
intfNum = atoi(argv[2]);
threshold = atoi(argv[3]);
dot1asIntfPdelayThresholdSet(&client_handle, intfNum, threshold);
show_help = 0;
}
break;
case 21:
if (argc == 3)
{
intfNum = atoi(argv[2]);
dot1asIntfAllowedLostRespGet(&client_handle, intfNum, &numAllowedLostResp);
show_help = 0;
}
break;
case 22:
if (argc == 4)
{
intfNum = atoi(argv[2]);
numAllowedLostResp = atoi(argv[3]);
dot1asIntfAllowedLostRespSet(&client_handle, intfNum, numAllowedLostResp);
show_help = 0;
}
break;
case 23:
if (argc == 3)
{
intfNum = atoi(argv[2]);
dot1asIntfNeighborRateRatioGet(&client_handle, intfNum, &rateRatio);
show_help = 0;
}
break;
case 24:
if (argc == 4)
{
intfNum = atoi(argv[2]);
intervalType = atoi(argv[3]);
dot1asIntfIntervalGet(&client_handle, intfNum, intervalType, &interval);
show_help = 0;
}
break;
case 25:
if (argc == 5)
{
intfNum = atoi(argv[2]);
intervalType = atoi(argv[3]);
interval = atoi(argv[4]);
dot1asIntfIntervalSet(&client_handle, intfNum, intervalType, interval);
show_help = 0;
}
break;
case 26:
if (argc == 4)
{
intfNum = atoi(argv[2]);
counterType = atoi(argv[3]);
dot1asIntfStatsGet(&client_handle, intfNum, counterType, &counterValue);
show_help = 0;
}
break;
case 27:
if (argc == 3)
{
intfNum = atoi(argv[2]);
dot1asIntfStatsReset(&client_handle, intfNum);
show_help = 0;
}
break;
case 28:
if (argc == 2)
{
runSanity(&client_handle);
show_help = 0;
}
break;
default:
break;
}
if (show_help == 1)
{
printAppMenu(argv[0]);
}
L7PROC_LOGF(L7PROC_LOG_SEVERITY_INFO, 0, "Stopping dot1as API example application");
return 0;
}