# cmd.h File Reference

This graph shows which files directly or indirectly include this file:

## Defines
#define | CMDLINESIZE 256
| Maximum command line size in characters.
#define | SERIALMSGSIZE 128
| Maximum serial message size in bytes.
## Functions
int | help_fun (char *msg, char *buf, int curindex, int len, int16_t g_sockfd)
int | processCmd (char *cmd, int curindex, int len, int16_t g_sockfd)
| process shell command
void | prompt (int16_t g_sockfd)
| this function sends a prompt to a TCP socket

## Detailed Description

## Define Documentation

#define CMDLINESIZE 256

Maximum command line size in characters.

#define SERIALMSGSIZE 128

Maximum serial message size in bytes.

## Function Documentation

int help_fun | ( | char * | msg,
|  | char * | buf,
|  | int | curindex,
|  | int | len,
|  | int16_t | g_sockfd |
| ) |  |  |

int processCmd | ( | char * | cmd,
|  | int | curindex,
|  | int | len,
|  | int16_t | sockfd |
| ) |  |  |

process shell command

processCmd

Process command in command buffer cmd[] starting at cmd[curindex] and ending at cmd[len] Dispatches to individual command handlers

Parameters:

  | cmd | is the pointer to the string of shell command
  | curindex | is always zero
  | len | is the number of characters in the shell command
  | sockfd | is the TCP socket descriptor

Returns:
  0 or positive integers : Normal

  negative integers : Close

Here is the call graph for this function:

void prompt | ( | int16_t | sockfd | ) |

this function sends a prompt to a TCP socket

prompt

Parameters:

  | sockfd | is the descriptor of the socket

Returns:
  none

Here is the call graph for this function: