Debug Console
[Debug]

Collaboration diagram for Debug Console:


Files

file  fip_console.c
 FIP Console.

Functions

static unsigned char fip_console_link (void)
 Processes the 'link' commands, uses the strtok() to get the string to work in.
static unsigned char fip_console_addr (void)
 Processes the 'addr' commands, uses the strtok() to get the string to work in.
static unsigned char fip_console_pref (void)
 Processes the 'addr' commands, uses the strtok() to get the string to work in.
static unsigned char fip_console_neighbour (void)
 Processes the 'neig' commands, uses the strtok() to get the string to work in.
static unsigned char fip_console_ping6 (void)
 Send an ICMPv6 Echo Request.
static unsigned char fip_console_route (void)
 Processes the 'route' commands, uses the strtok() to get the string to work in.
static unsigned char fip_console_udp (void)
 Processes the 'udp' commands, uses the strtok() to get the string to work in.
static void fip_console_usage (void)
 Print FIP Console Usage Information.
void fip_console (char *str)
 Main FIP console.
static fip_bool_t fip_console_devNameToNumber (char *curstr, unsigned char *deviceNum)
 Convert the passed string for an interface name to the associated interface number, or if a number was passed just conver this number from ASCII to decimal.
unsigned char str2addr (char *str, uint8_t *addr, unsigned char maxlen)
 Convert a string in '02:03:04:05:06' format to array {0x02,0x03,0x04,0x05,0x06}.
static fip_bool_t fip_console_getdev (uint8_t *deviceNum)
 Gets the 'dev' parameter from the string currently in strtok().

Variables

static const char tokens [] = " \n"
 Tokens used during processing.

Function Documentation

void fip_console ( char *  str  ) 

Main FIP console.

Pass 'str' is a null-terminated string. Can also include the trailing newline or carriage return character without problem.

Parameters:
str String to parse / act upon

References fip_console_addr(), fip_console_link(), fip_console_neighbour(), fip_console_ping6(), fip_console_pref(), fip_console_route(), fip_console_udp(), fip_console_usage(), fip_ipUtils_IP6toString(), fip_ipUtils_stringToIP6(), fip_packet_getAttr, PRINTCONST, PRINTF, RV_OK, tokens, TRACE_LEVEL_DEBUG, TRACE_LEVEL_ERROR, TRACE_LEVEL_INFO, TRACE_LEVEL_NONE, and TRACE_LEVEL_WARN.

Here is the call graph for this function:

static unsigned char fip_console_addr ( void   )  [static]

Processes the 'addr' commands, uses the strtok() to get the string to work in.

Returns:
Number of arguments processed

References fip_ip6addr_t::addr, ADDR_AUTOCONF, ADDR_DEPRECATED, ADDR_MANUAL, ADDR_PREFERRED, ADDR_TENATIVE, ADDR_UNUSED, fip_console_getdev(), fip_if6_addUnicastAddress(), fip_ipUtils_IP6toString(), fip_ipUtils_stringToIP6(), PRINTCONST, PRINTF, RV_OK, and tokens.

Referenced by fip_console().

Here is the call graph for this function:

static fip_bool_t fip_console_devNameToNumber ( char *  curstr,
unsigned char *  deviceNum 
) [static]

Convert the passed string for an interface name to the associated interface number, or if a number was passed just conver this number from ASCII to decimal.

Parameters:
curstr String we wish to convert
deviceNum Pointer to where to store device number
Returns:
true if success, false if failed.

References PRINTCONST, and PRINTF.

Referenced by fip_console_getdev(), fip_console_link(), and fip_console_route().

static fip_bool_t fip_console_getdev ( uint8_t *  deviceNum  )  [static]

Gets the 'dev' parameter from the string currently in strtok().

Parameters:
deviceNum Pointer to where to store device number
Returns:
true indicates found dev, false indicates failure

References fip_console_devNameToNumber(), PRINTCONST, and tokens.

Referenced by fip_console_addr(), fip_console_neighbour(), and fip_console_pref().

Here is the call graph for this function:

static unsigned char fip_console_link ( void   )  [static]

Processes the 'link' commands, uses the strtok() to get the string to work in.

Returns:
Number of arguments processed

References fip_console_devNameToNumber(), fip_if_addLLAddress(), fip_memcpy_ucharLen, PRINTCONST, PRINTF, RV_OK, str2addr(), and tokens.

Referenced by fip_console().

Here is the call graph for this function:

static unsigned char fip_console_neighbour ( void   )  [static]

Processes the 'neig' commands, uses the strtok() to get the string to work in.

Returns:
Number of arguments processed

References fip_console_getdev(), fip_ipUtils_IP6toString(), fip_nd6_neighbourCache_t::lladdr, PRINTCONST, PRINTF, and tokens.

Referenced by fip_console().

Here is the call graph for this function:

static unsigned char fip_console_ping6 ( void   )  [static]

Send an ICMPv6 Echo Request.

Returns:

References fip_ip6addr_t::addr, fip_icmp6_generateEchoRequest(), fip_ipUtils_stringToIP6(), PRINTCONST, RV_OK, and tokens.

Referenced by fip_console().

Here is the call graph for this function:

static unsigned char fip_console_pref ( void   )  [static]

Processes the 'addr' commands, uses the strtok() to get the string to work in.

Returns:
Number of arguments processed

References fip_ip6addr_t::addr, fip_console_getdev(), fip_if6_addPrefix(), fip_ipUtils_IP6toString(), fip_ipUtils_stringToIP6(), PREFIX_UNUSED, PRINTCONST, PRINTF, RV_OK, and tokens.

Referenced by fip_console().

Here is the call graph for this function:

static unsigned char fip_console_route ( void   )  [static]

Processes the 'route' commands, uses the strtok() to get the string to work in.

Returns:
Number of arguments processed

References fip_ip6addr_t::addr, fip_console_devNameToNumber(), fip_ipUtils_IP6toString(), fip_ipUtils_stringToIP6(), fip_route6_addRoute(), PRINTCONST, PRINTF, ROUTE_UNUSED, RV_OK, and tokens.

Referenced by fip_console().

Here is the call graph for this function:

static unsigned char fip_console_udp ( void   )  [static]

Processes the 'udp' commands, uses the strtok() to get the string to work in.

Returns:
Number of arguments processed

References fip_ip6addr_t::addr, fip_ipUtils_stringToIP6(), fip_udp_listenPortList, FIP_UDP_NUM_CONNS, fip_udp_openListenPort(), fip_udp_sendFinish(), PRINTCONST, PRINTF, RV_OK, and tokens.

Referenced by fip_console().

Here is the call graph for this function:

unsigned char str2addr ( char *  str,
uint8_t *  addr,
unsigned char  maxlen 
)

Convert a string in '02:03:04:05:06' format to array {0x02,0x03,0x04,0x05,0x06}.

Parameters:
str Pointer to string
addr Pointer to where to store result
maxlen Maximum length of address array
Returns:
Number of bytes stored in address array

Referenced by fip_console_link().


Generated on Wed Dec 8 13:00:44 2010 for FIP by  doxygen 1.5.7.1