#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: Set the linuxPTP global admin mode: %s 1 <mode>\n", name);
printf("Test 2: Get the linuxPTP global admin mode: %s 2 \n", name);
printf("Test 3: Set the linuxPTP interface admin mode: %s 3 <ifNum> <mode>\n",
name);
printf("Test 4: Get the linuxPTP interface admin mode: %s 4 <ifNum>\n", name);
printf("Test 5: Get the E2E mean path delay: %s 5 \n", name);
printf("Test 6: Get the linuxPTP port state: %s 6 <ifNum>\n", name);
printf("Test 7: Get the P2P mean path delay: %s 7 <ifNum> \n", name);
printf("Test 8: Get the statistics for the given type on an interface:"
" %s 8 <ifNum> <statType> \n", name);
printf("Test 9: Get (parent or GM or local) clock identity: %s 9 <type> \n",
name);
printf("Test 10: Get (parent or GM or local) clock parameters: %s 10 <type>\n",
name);
printf("Test 11: Set priority value of the local clock: %s 11 <prioType>"
" <prioVal>\n", name);
printf("Test 12: Get priority value of the local clock: %s 12 <prioType>\n",
name);
printf("Test 13: Set linuxPTP clock operation mode: %s 13 <operMode>\n", name);
printf("Test 14: Get linuxPTP clock operation mode: %s 14 \n", name);
printf("Test 15: Set source IPv4 address to be used for linuxPTP communication:"
" %s 15 <ipAddr>\n", name);
printf("Test 16: Get the source IPv4 address used for linuxPTP communication:"
" %s 16\n", name);
printf("Test 17: Set source IPv6 address to be used for linuxPTP communication:"
" %s 17 <ipAddr>\n", name);
printf("Test 18: Get the source IPv6 address used for linuxPTP communication:"
" %s 18 \n", name);
printf("Test 19: Set linuxPTP profile: %s 19 <ptpProfile>\n", name);
printf("Test 20: Get the active linuxPTP profile: %s 20 <ptpProfile>\n", name);
printf("Test 21: Set linuxPTP profile's transport mode: %s 21 <ptpProfile> "
"<transMode>\n", name);
printf("Test 22: Get the linuxPTP transport mode for a given profile:"
" %s 22 <ptpProfile> \n", name);
printf("Test 23: Set announce interval for given linuxPTP profile: %s 23 "
"<ptpProfile> <announceInterval>\n", name);
printf("Test 24: Get the configured linuxPTP announce interval for a given "
"profile: %s 24 <ptpProfile> \n", name);
printf("Test 25: Set announce timeout for given linuxPTP profile: %s 25 "
"<ptpProfile> <announceTimeout>\n", name);
printf("Test 26: Get the linuxPTP announce timeout value for a given profile:"
" %s 26 <ptpProfile> \n", name);
printf("Test 27: Set sync interval for given linuxPTP profile: %s 27 <ptpProfile>"
" <syncInterval>\n", name);
printf("Test 28: Get the linuxPTP Sync Interval for a given profile: %s 28"
" <ptpProfile> \n", name);
printf("Test 29: Set delay request interval for given linuxPTP profile: %s 29 "
"<ptpProfile> <delayReqInterval>\n", name);
printf("Test 30: Get the linuxPTP delay request Interval for a given profile:"
" %s 30 <ptpProfile> \n", name);
printf("Test 31: Set peer delay request interval for given linuxPTP profile: "
"%s 31 <ptpProfile> <pDelayReqInterval>\n", name);
printf("Test 32: Get the linuxPTP peer delay request Interval for a given "
"profile: %s 32 <ptpProfile> \n", name);
printf("Test 33: Set domain number for given linuxPTP profile: %s 33 <ptpProfile> "
"<domain>\n", name);
printf("Test 34: Get the linuxPTP Domain for a given profile: %s 34 "
"<ptpProfile> \n", name);
printf("Test 35: Set linuxPTP delay mechanism: %s 35 <ptpProfile> <delayMech>\n",
name);
printf("Test 36: Get the linuxPTP delay mechanism for a given profile: "
"%s 36 <ptpProfile> \n", name);
printf("Test 37: Configure linuxPTP logging severity level: %s 37 <level>\n", name);
printf("Test 38: Fetch linuxPTP logging severity level: %s 38 <level>\n", name);
printf("Test 39: Clear linuxPTP statistics on an interface: %s 39 <ifNum>\n", name);
printf("Test 40: Get linuxPTP interface operational status: %s 40 <ifNum>\n", name);
printf("Test 41: Check whether the interface is eligible for linuxptp operation:"
" %s 41 <ifNum>\n", name);
printf("Test 42: Check if the passed domain identifier is configured:"
" %s 42 <domain>\n", name);
printf("Test 43: Get time properties information: %s 43 <type>\n", name);
printf("Test 44: Get number of boundary clocks between local clock and foreign "
"master: %s 44 \n", name);
printf("Test 45: Get current clock offset in time between slave and master:"
" %s 45 \n", name);
printf("Test 46: Status of the mode the clock is operating in master or slave:"
" %s 46 \n", name);
printf("Test 47: Set linuxPTP path trace TLV: %s 47 <traceMode>\n", name);
printf("Test 48: Get linuxPTP path trace TLV status: %s 48 \n", name);
printf("Test 49: Get next clock identity in the path: %s 49 <type>\n", name);
return;
}
{
{
printf("Bad return code trying to set the linuxPTP Global Admin Mode. "
"(result = %d)\n", result);
}
else
{
printf("Admin mode set successfully.\n");
}
return;
}
{
{
printf("Bad return code trying to get the linuxPTP Global Admin Mode. "
"(result = %d)\n", result);
}
else
{
printf("Global admin mode is %u.\n", *mode);
}
return;
}
{
{
printf("Bad return code trying to set the linuxPTP interface Admin Mode."
" (result = %d)\n", result);
}
else
{
printf("Interface admin mode set successfully.\n");
}
return;
}
{
{
printf("Bad return code trying to get the linuxPTP interface Admin Mode."
" (result = %d)\n", result);
}
else
{
printf("Interface %u admin mode is %u.\n", ifNum, *mode);
}
return;
}
{
char delay[256] = {0};
clockMeanPathDelay.
pstart = delay;
clockMeanPathDelay.
size = 256;
&clockMeanPathDelay))
{
printf("Bad return code trying to fetch E2E mean path delay. "
"(result = %d)\n", result);
}
else
{
printf("Mean path delay : %s.\n", (char *) clockMeanPathDelay.pstart);
}
return;
}
uint32_t ifNum, int32_t *portState)
{
{
printf("Bad return code trying to fetch PTP port state. "
"(result = %d)\n", result);
}
else
{
printf("Interface %d state is %u.\n", ifNum, *portState);
}
return;
}
uint32_t ifNum)
{
char delay[256] = {0};
p2pPathDelay.pstart = delay;
p2pPathDelay.size = 256;
{
printf("Bad return code trying to fetch P2P mean path delay. "
"(result = %d)\n", result);
}
else
{
printf("Interface %u P2P mean path delay : %s\n", ifNum, (char *) p2pPathDelay.pstart);
}
return;
}
uint32_t ifNum, OPEN_LINUXPTP_STATS_TYPE_t statType,
int32_t *statsCount)
{
{
printf("Bad return code trying to fetch statistics for the given type "
"on an interface. (result = %d)\n", result);
}
else
{
printf("Count : %d.\n", *statsCount);
}
return;
}
OPEN_LINUXPTP_DS_TYPE_t type)
{
char id[256] = {0};
identity.pstart = id;
identity.size = 256;
{
printf("Bad return code trying to fetch parent or GM or local clock "
"identity. (result = %d)\n", result);
}
else
{
printf("Clock identity : %s.\n", (char *) identity.pstart);
}
return;
}
OPEN_LINUXPTP_DS_TYPE_t type, int32_t *value)
{
{
printf("Bad return code trying to fetch parent or GM or local clock"
" parameters. (result = %d)\n", result);
}
else
{
printf("Number of linuxPTP ports %d\n", *value);
}
return;
}
OPEN_LINUXPTP_CLOCK_PRIORITY_t prioType,
uint32_t prioVal)
{
{
printf("Bad return code trying to configure priority value of the local "
"clock. (result = %d)\n", result);
}
else
{
printf("Bridge priority set successfully.\n");
}
return;
}
OPEN_LINUXPTP_CLOCK_PRIORITY_t prioType,
uint32_t *prioVal)
{
{
printf("Bad return code trying to get priority value of the local clock."
" (result = %d)\n", result);
}
else
{
printf("Bridge priority : %u.\n", *prioVal);
}
return;
}
OPEN_LINUXPTP_CLOCK_OPERATION_t operMode)
{
{
printf("Bad return code trying to configure PTP clock operation mode."
" (result = %d)\n", result);
}
else
{
printf("Clock operation mode set successfully.\n");
}
return;
}
uint32_t *operMode)
{
{
printf("Bad return code trying to get the Clock Operation for the local"
" clock. (result = %d)\n", result);
}
else
{
printf("Clock operation mode : %u.\n", *operMode);
}
return;
}
char * ipAddr)
{
uint32_t inetIpAddr = 0;
char str[40];
memset(str, 0, sizeof(str));
strncpy(str, ipAddr, sizeof(str) - 1);
ipBuffdesc.pstart = str;
ipBuffdesc.size = strlen(str) + 1;
{
printf("ERROR: Bad return code trying to convert internet address string "
"to a 32 bit integer. result = %d.\n", result);
return;
}
{
printf("Bad return code trying to configure source IPv4 address to be"
" used for linuxPTP communication. (result = %d)\n", result);
}
else
{
printf("Source IP set successfully.\n");
}
return;
}
{
uint32_t ipAddr = 0;
char ipDescStr[32];
ipDesc.pstart = ipDescStr;
ipDesc.size = sizeof(ipDescStr)-1;
{
printf("Bad return code trying to get the source IPv4 address used for linuxPTP"
"communication. (result = %d)\n", result);
}
else
{
openAddr.
addr.
ipv4 = ipAddr;
printf ("Source IP address %s\n", (char *)ipDesc.pstart);
}
return;
}
char* ipAddr)
{
buffDesc.pstart = ipAddr;
buffDesc.size = strlen(ipAddr) + 1;
{
printf("ERROR: Bad return code trying to convert internet address string.");
return;
}
{
printf("Bad return code trying to configure source IPv6 address to be"
" used for linuxPTP communication. (result = %d)\n", result);
}
else
{
printf("Source IPv6 address set successfully.\n");
}
return;
}
{
char ipDescStr[256] = {0};
ipDesc.pstart = ipDescStr;
ipDesc.size = sizeof(ipDescStr)-1;
{
printf("Bad return code trying to get the source IPv6 address used for "
"linuxPTP communication. (result = %d)\n", result);
}
else
{
printf ("Source IPv6 address : %s.\n", (char *)ipDesc.pstart);
}
return;
}
uint32_t ptpProfile)
{
{
printf("Bad return code trying to configure PTP profile. (result = %d)\n", result);
}
else
{
printf("PTP profile set successfully.\n");
}
return;
}
uint32_t *ptpProfile)
{
{
printf("Bad return code trying to get the active linuxPTP profile."
" (result = %d)\n", result);
}
else
{
printf("PTP profile : %u \n", *ptpProfile);
}
return;
}
uint32_t ptpProfile,
OPEN_LINUXPTP_TRANSPORT_MODE_t transMode)
{
{
printf("Bad return code trying to configure PTP profile's transport mode."
" (result = %d)\n", result);
}
else
{
printf("PTP profile transport mode set successfully.\n");
}
return;
}
uint32_t ptpProfile,
uint32_t *transMode)
{
{
printf("Bad return code trying to get the linuxPTP transport for a "
"given profile. (result = %d)\n", result);
}
else
{
printf("PTP profile transport mode is %u.\n", *transMode);
}
return;
}
uint32_t ptpProfile,
int32_t announceInterval)
{
announceInterval))
{
printf("Bad return code trying to configure announce interval for "
"given PTP profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP announce interval set successfully.\n");
}
return;
}
uint32_t ptpProfile,
int32_t *announceInterval)
{
{
printf("Bad return code trying to get the configured linuxPTP announce "
"interval for a given profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP announce interval is %d.\n", *announceInterval);
}
return;
}
uint32_t ptpProfile,
uint32_t announceTimeout)
{
{
printf("Bad return code trying to configure announce timeout for given "
"PTP profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP announce timeout set successfully.\n");
}
return;
}
uint32_t ptpProfile,
uint32_t *announceTimeout)
{
{
printf("Bad return code trying to get the linuxPTP announce timeout value"
" for a given profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP announce timeout is : %u.\n", *announceTimeout);
}
return;
}
uint32_t ptpProfile,
int32_t syncInterval)
{
{
printf("Bad return code trying to configure sync interval for given PTP "
"profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP sync interval set successfully.\n");
}
return;
}
uint32_t ptpProfile,
int32_t *syncInterval)
{
{
printf("Bad return code trying to get the linuxPTP Sync Interval for a"
" given profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP sync interval is : %d.\n", *syncInterval);
}
return;
}
uint32_t ptpProfile,
int32_t delayReqInterval)
{
ptpProfile,
delayReqInterval))
{
printf("Bad return code trying to configure delay request interval for"
" given PTP profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP delay request interval set successfully.\n");
}
return;
}
uint32_t ptpProfile,
int32_t *delayReqInterval)
{
ptpProfile,
delayReqInterval))
{
printf("Bad return code trying to get the linuxPTP delay request Interval"
" for a given profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP delay request interval is : %d.\n", *delayReqInterval);
}
return;
}
uint32_t ptpProfile,
int32_t pDelayReqInterval)
{
ptpProfile,
pDelayReqInterval))
{
printf("Bad return code trying to configure peer delay request interval"
" for given PTP profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP peer delay request interval set successfully.\n");
}
return;
}
uint32_t ptpProfile,
int32_t *pDelayReqInterval)
{
ptpProfile,
pDelayReqInterval))
{
printf("Bad return code trying to get the linuxPTP peer delay request "
"Interval for a given profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP peer delay request interval is : %d.\n", *pDelayReqInterval);
}
return;
}
uint32_t ptpProfile, uint32_t domain)
{
{
printf("Bad return code trying to configure domain number for given "
"PTP profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP domain set successfully.\n");
}
return;
}
uint32_t ptpProfile, uint32_t *domain)
{
{
printf("Bad return code trying to get the linuxPTP Domain for a given "
"profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP domain is %u.\n", *domain);
}
return;
}
uint32_t ptpProfile, uint32_t delayMech)
{
{
printf("Bad return code trying to configure PTP delay mechanism. "
"(result = %d)\n", result);
}
else
{
printf("Linux PTP delay mechanism set successfully.\n");
}
return;
}
uint32_t ptpProfile, uint32_t *delayMech)
{
{
printf("Bad return code trying to get the linuxPTP delay mechanism for a"
" given profile. (result = %d)\n", result);
}
else
{
printf("Linux PTP delay mechanism is : %u.\n", *delayMech);
}
return;
}
uint32_t level)
{
{
printf("Bad return code trying to configure PTP logging severity level."
" (result = %d)\n", result);
}
else
{
printf("Linux PTP logging level set successfully.\n");
}
return;
}
uint32_t *level)
{
{
printf("Bad return code trying to fetch PTP logging severity "
"level. (result = %d)\n", result);
}
else
{
printf("Linux PTP logging level is : %u.\n", *level);
}
return;
}
uint32_t ifNum)
{
{
printf("Bad return code trying to clear PTP statistics on an interface."
" (result = %d)\n", result);
}
else
{
printf("Linux PTP interface statistics cleared successfully.\n");
}
return;
}
{
{
printf("Bad return code trying to get PTP interface operational status"
". (result = %d)\n", result);
}
else
{
printf("Linux PTP interface operational status is : %u.\n", *status);
}
return;
}
{
{
printf("Bad return code trying to check whether the interface is"
" eligible for linuxptp operation. (result = %d)\n", result);
}
else
{
printf("Interface %u %sa valid linux ptp port.\n", ifNum,
}
return;
}
{
{
printf("Bad return code trying to check if the passed domain identifier"
" is configured. (result = %d)\n", result);
}
else
{
printf("Domain ID %u is %sconfigured.\n", domain,
}
return;
}
uint32_t type, int32_t *value)
{
{
printf("Bad return code trying to fetch time properties information."
" (result = %d)\n", result);
}
else
{
printf("Time property value is : %d.\n", *value);
}
return;
}
uint32_t *stepsRemoved)
{
stepsRemoved))
{
printf("Bad return code trying to fetch number of boundary clocks"
" between local clock and foreign master. (result = %d)\n", result);
}
else
{
printf("Steps removed is : %u.\n", *stepsRemoved);
}
return;
}
{
char offset[256] = {0};
offsetFromMaster.pstart = offset;
offsetFromMaster.size = 256;
&offsetFromMaster))
{
printf("Bad return code trying to fetch current clock offset in "
"time between slave and master. (result = %d)\n", result);
}
else
{
printf("Current clock offset is : %s.\n", (char *) offsetFromMaster.pstart);
}
return;
}
uint32_t *clockRole)
{
{
printf("Bad return code trying to status of the mode the clock is "
"operating in master or slave. (result = %d)\n", result);
}
else
{
printf("Clock role is : %u.\n", *clockRole);
}
return;
}
{
{
printf("Bad return code trying to configure PTP path trace TLV."
" (result = %d)\n", result);
}
else
{
printf("PTP trace mode set succesfully.\n");
}
return;
}
{
{
printf("Bad return code trying to fetch PTP path trace TLV status."
" (result = %d)\n", result);
}
else
{
printf("PTP trace status is : %u.\n", *traceMode);
}
return;
}
OPEN_LINUXPTP_DS_TYPE_t type)
{
char id[256] = {0};
identity.pstart = id;
identity.size = 256;
{
printf("Bad return code trying to fetch next clock identity in the path. "
"(result = %d)\n", result);
}
else
{
printf("Clock identity is : %s.\n", (char *)identity.pstart);
}
return;
}
int main(int argc, char **argv)
{
uint32_t testNum, val;
int32_t value;
char switch_os_revision_string[100];
int show_help = 1;
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 LinuxPTP 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 == 3)
{
linuxptpAdminModeSet(&client_handle, atoi(argv[2]));
show_help = 0;
}
break;
case 2:
if (argc == 2)
{
linuxptpAdminModeGet(&client_handle, &val);
show_help = 0;
}
break;
case 3:
if (argc == 4)
{
linuxptpIntfAdminModeSet(&client_handle, atoi(argv[2]), atoi(argv[3]));
show_help = 0;
}
break;
case 4:
if (argc == 3)
{
linuxptpIntfAdminModeGet(&client_handle, atoi(argv[2]), &val);
show_help = 0;
}
break;
case 5:
if (argc == 2)
{
linuxptpClockMeanPathDelayGet(&client_handle);
show_help = 0;
}
break;
case 6:
if (argc == 3)
{
linuxptpIntfStateGet(&client_handle, atoi(argv[2]), &value);
show_help = 0;
}
break;
case 7:
if (argc == 3)
{
linuxptpIntfDelayGet(&client_handle, atoi(argv[2]));
show_help = 0;
}
break;
case 8:
if (argc == 4)
{
linuxptpIntfStatsGet(&client_handle, atoi(argv[2]), atoi(argv[3]), &value);
show_help = 0;
}
break;
case 9:
if (argc == 3)
{
linuxptpClockIdGet(&client_handle, atoi(argv[2]));
show_help = 0;
}
break;
case 10:
if (argc == 3)
{
linuxptpClockParamGet(&client_handle, atoi(argv[2]), &value);
show_help = 0;
}
break;
case 11:
if (argc == 4)
{
linuxptpBridgePrioritySet(&client_handle, atoi(argv[2]), atoi(argv[3]));
show_help = 0;
}
break;
case 12:
if (argc == 3)
{
linuxptpBridgePriorityGet(&client_handle, atoi(argv[2]), &val);
show_help = 0;
}
break;
case 13:
if (argc == 3)
{
linuxptpClockOperModeSet(&client_handle, atoi(argv[2]));
show_help = 0;
}
break;
case 14:
if (argc == 2)
{
linuxptpClockOperModeGet(&client_handle, &val);
show_help = 0;
}
break;
case 15:
if (argc == 3)
{
linuxptpSourceIPv4AddrSet(&client_handle, argv[2]);
show_help = 0;
}
break;
case 16:
if (argc == 2)
{
linuxptpSourceIPv4AddrGet(&client_handle);
show_help = 0;
}
break;
case 17:
if (argc == 3)
{
linuxptpSourceIPv6AddrSet(&client_handle, argv[2]);
show_help = 0;
}
break;
case 18:
if (argc == 2)
{
linuxptpSourceIPv6AddrGet(&client_handle);
show_help = 0;
}
break;
case 19:
if (argc == 3)
{
linuxptpProfileSet(&client_handle, atoi(argv[2]));
show_help = 0;
}
break;
case 20:
if (argc == 2)
{
linuxptpProfileGet(&client_handle, &val);
show_help = 0;
}
break;
case 21:
if (argc == 4)
{
linuxptpTransportSet(&client_handle, atoi(argv[2]), atoi(argv[3]));
show_help = 0;
}
break;
case 22:
if (argc == 3)
{
linuxptpTransportGet(&client_handle, atoi(argv[2]), &val);
show_help = 0;
}
break;
case 23:
if (argc == 4)
{
linuxptpAnnounceIntervalSet(&client_handle, atoi(argv[2]), atoi(argv[3]));
show_help = 0;
}
break;
case 24:
if (argc == 3)
{
linuxptpAnnounceIntervalGet(&client_handle, atoi(argv[2]), &value);
show_help = 0;
}
break;
case 25:
if (argc == 4)
{
linuxptpAnnounceTimeoutSet(&client_handle, atoi(argv[2]), atoi(argv[3]));
show_help = 0;
}
break;
case 26:
if (argc == 3)
{
linuxptpAnnounceTimeoutGet(&client_handle, atoi(argv[2]), &val);
show_help = 0;
}
break;
case 27:
if (argc == 4)
{
linuxptpSyncIntervalSet(&client_handle, atoi(argv[2]), atoi(argv[3]));
show_help = 0;
}
break;
case 28:
if (argc == 3)
{
linuxptpSyncIntervalGet(&client_handle, atoi(argv[2]), &value);
show_help = 0;
}
break;
case 29:
if (argc == 4)
{
linuxptpDelayRequestIntervalSet(&client_handle, atoi(argv[2]),
atoi(argv[3]));
show_help = 0;
}
break;
case 30:
if (argc == 3)
{
linuxptpDelayRequestIntervalGet(&client_handle, atoi(argv[2]), &value);
show_help = 0;
}
break;
case 31:
if (argc == 4)
{
linuxptpPdelayRequestIntervalSet(&client_handle, atoi(argv[2]),
atoi(argv[3]));
show_help = 0;
}
break;
case 32:
if (argc == 3)
{
linuxptpPdelayRequestIntervalGet(&client_handle, atoi(argv[2]), &value);
show_help = 0;
}
break;
case 33:
if (argc == 4)
{
linuxptpDomainSet(&client_handle, atoi(argv[2]), atoi(argv[3]));
show_help = 0;
}
break;
case 34:
if (argc == 3)
{
linuxptpDomainGet(&client_handle, atoi(argv[2]), &val);
show_help = 0;
}
break;
case 35:
if (argc == 4)
{
linuxptpDelayMechanismSet(&client_handle, atoi(argv[2]), atoi(argv[3]));
show_help = 0;
}
break;
case 36:
if (argc == 3)
{
linuxptpDelayMechanismGet(&client_handle, atoi(argv[2]), &val);
show_help = 0;
}
break;
case 37:
if (argc == 3)
{
linuxptpLoggingSet(&client_handle, atoi(argv[2]));
show_help = 0;
}
break;
case 38:
if (argc == 2)
{
linuxptpLoggingGet(&client_handle, &val);
show_help = 0;
}
break;
case 39:
if (argc == 3)
{
linuxptpIntfStatsClear(&client_handle, atoi(argv[2]));
show_help = 0;
}
break;
case 40:
if (argc == 3)
{
linuxptpIntfOperStateGet(&client_handle, atoi(argv[2]), &flag);
show_help = 0;
}
break;
case 41:
if (argc == 3)
{
linuxptpIsValidIntf(&client_handle, atoi(argv[2]), &flag);
show_help = 0;
}
break;
case 42:
if (argc == 3)
{
linuxptpIsDomainExists(&client_handle, atoi(argv[2]), &flag);
show_help = 0;
}
break;
case 43:
if (argc == 3)
{
linuxptpTimePropGet(&client_handle, atoi(argv[2]), &value);
show_help = 0;
}
break;
case 44:
if (argc == 2)
{
linuxptpClockStepsRemovedGet(&client_handle, &val);
show_help = 0;
}
break;
case 45:
if (argc == 2)
{
linuxptpClockOffsetFromMaster(&client_handle);
show_help = 0;
}
break;
case 46:
if (argc == 2)
{
linuxptpClockRoleGet(&client_handle, &val);
show_help = 0;
}
break;
case 47:
if (argc == 3)
{
linuxptpPathTraceTlvSet(&client_handle, atoi(argv[2]));
show_help = 0;
}
break;
case 48:
if (argc == 2)
{
linuxptpPathTraceTlvGet(&client_handle, &flag);
show_help = 0;
}
break;
case 49:
if (argc == 3)
{
linuxptpPathTraceClockIdGetNext(&client_handle, atoi(argv[2]));
show_help = 0;
}
break;
default:
break;
}
if (show_help == 1)
{
printAppMenu(argv[0]);
}
L7PROC_LOGF(L7PROC_LOG_SEVERITY_INFO, 0, "Stopping LinuxPTP API example application");
return 0;
}