Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
Traceroute can be used to discover the paths packets take to a remote destination, as well as where routing breaks down. The purpose behind the traceroute command is to record the source of each ICMP "time exceeded" message in order to provide a trace of the path the packet took to reach the destination.
This document provides a brief description of the Traceroute OpEN APIs. It provides the following services:
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
traceroute_example.c is a sample application that demonstrates the use of the Traceroute OpEN API. traceroute_example is started from the command line. It then exercises all the Traceroute OpEN APIs one by one with appropriate arguments to manage the Traceroute component in the ICOS main process (switchdrvr).
Usage: traceroute_example <test#> <arg1> <arg2> ...
Usage: In below, <srcIfType> should be set to 0 for service port, and 1 for network port
Test 1: Traceroute host or IPv4/IPv6 Address: traceroute_example 1 <ip-address/hostname/ipv6-address>
Test 2: Traceroute host or IPv4/IPv6 Address with count: traceroute_example 2 <ip-address/hostname/ipv6-address> count <count>
Test 3: Traceroute host or IPv4/IPv6 Address with interval: traceroute_example 3 <ip-address/hostname/ipv6-address> interval <interval>
Test 4: Traceroute host or IPv4/IPv6 Address with Ttl: traceroute_example 4 <ip-address/hostname/ipv6-address> initTtl <initTtl> maxTtl <maxTtl>
Test 5: Traceroute host or IPv4/IPv6 Address with maximum Failures: traceroute_example 5 <ip-address/hostname/ipv6-address> maxFail <maxFail>
Test 6: Traceroute host or IPv4/IPv6 Address with size: traceroute_example 6 <ip-address/hostname/ipv6-address> size <size>
Test 7: Traceroute host or IPv4/IPv6 Address with UDP Dest port: traceroute_example 7 <ip-address/hostname/ipv6-address> port <port>
Test 8: Traceroute host or IPv4/IPv6 Address with source interface: traceroute_example 8 <ip-address/hostname/ipv6-address> source <srcIfType>
Test 9: Traceroute host or IPv4/IPv6 Address with count, size, interval and source interface: traceroute_example 9 <ip-address/hostname/ipv6-address> count <count> interval <interval> initTtl <initTtl> maxTtl <maxTtl> maxFail <maxFail> size <size> port <port> source <srcIfType>
Test 10: traceroute_example OpEN APIs sanity: traceroute_example 10
CLI Command | OpEN API Reference |
---|---|
(Priv-User Mode)# traceroute <ip-address/hostname> count <count> interval <interval> size <size> source <srcIfType> | openapiTracerouteAddress() |
(Priv-User Mode)#
traceroute <ipaddr|ipv6addr|hostname> | openapiTracerouteAddress() (Priv-User Mode)#
traceroute <ipaddr|ipv6addr|hostname> count <count> | openapiTracerouteAddressWithCount() (Priv-User Mode)#
traceroute <ipaddr|ipv6addr|hostname> interval <interval> | openapiTracerouteAddressWithInterval() (Priv-User Mode)#
traceroute <ipaddr|ipv6addr|hostname> initTtl <initTtl> maxTtl <maxTtl> | openapiTracerouteAddressWithTtl() (Priv-User Mode)#
traceroute <ipaddr|ipv6addr|hostname> maxFail <maxFail> | openapiTracerouteAddressWithMaxFail() (Priv-User Mode)#
traceroute <ipaddr|ipv6addr|hostname> size <size> | openapiTracerouteAddressWithPDUSize() (Priv-User Mode)#
traceroute <ipaddr|ipv6addr|hostname> port <port> | openapiTracerouteAddressWithUdpPort() (Priv-User Mode)#
traceroute <ipaddr|ipv6addr|hostname> source <srcIfType> | openapiTracerouteAddressWithSourceInterface() (Priv-User Mode)#
traceroute <ipaddr|ipv6addr|hostname> count <count> interval <interval> initTtl <initTtl> maxTtl <maxTtl> maxFail <maxFail> size <size> port <port> source <srcIfType> | openapiTracerouteAddressExplicit()