Rev 4700 | Rev 4708 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4700 | Rev 4704 | ||
|---|---|---|---|
| Line 29... | Line 29... | ||
| 29 | /** @addtogroup echo |
29 | /** @addtogroup echo |
| 30 | * @{ |
30 | * @{ |
| 31 | */ |
31 | */ |
| 32 | 32 | ||
| 33 | /** @file |
33 | /** @file |
| - | 34 | * Echo application. |
|
| - | 35 | * Answers received packets. |
|
| 34 | */ |
36 | */ |
| 35 | 37 | ||
| 36 | #include <malloc.h> |
38 | #include <malloc.h> |
| 37 | #include <stdio.h> |
39 | #include <stdio.h> |
| 38 | #include <string.h> |
40 | #include <string.h> |
| Line 54... | Line 56... | ||
| 54 | * @param argv The command line parameters. Input parameter. |
56 | * @param argv The command line parameters. Input parameter. |
| 55 | * @returns EOK on success. |
57 | * @returns EOK on success. |
| 56 | */ |
58 | */ |
| 57 | int main( int argc, char * argv[] ); |
59 | int main( int argc, char * argv[] ); |
| 58 | 60 | ||
| - | 61 | /** @name Output printing functions |
|
| - | 62 | */ |
|
| - | 63 | /*@{*/ |
|
| - | 64 | ||
| 59 | /** Prints the application help. |
65 | /** Prints the application help. |
| 60 | */ |
66 | */ |
| 61 | void print_help( void ); |
67 | void print_help( void ); |
| 62 | 68 | ||
| 63 | /** Prints the parameter unrecognized message and the application help. |
69 | /** Prints the parameter unrecognized message and the application help. |
| 64 | * @param index The index of the parameter. Input parameter. |
70 | * @param index The index of the parameter. Input parameter. |
| 65 | * @param parameter The parameter name. Input parameter. |
71 | * @param parameter The parameter name. Input parameter. |
| 66 | */ |
72 | */ |
| 67 | void print_unrecognized( int index, const char * parameter ); |
73 | void print_unrecognized( int index, const char * parameter ); |
| 68 | 74 | ||
| - | 75 | /*@}*/ |
|
| - | 76 | ||
| - | 77 | /** @name Command line argumets parsing functions |
|
| - | 78 | */ |
|
| - | 79 | /*@{*/ |
|
| - | 80 | ||
| 69 | /** Parses the next parameter as an integral number. |
81 | /** Parses the next parameter as an integral number. |
| 70 | * Uses the offseted actual parameter if the offset is set or the next one if not. |
82 | * Uses the offseted actual parameter if the offset is set or the next one if not. |
| 71 | * @param argc The total number of the parameters. Input parameter. |
83 | * @param argc The total number of the parameters. Input parameter. |
| 72 | * @param argv The parameters. Input parameter. |
84 | * @param argv The parameters. Input parameter. |
| 73 | * @param index The actual parameter index. Input/output parameter. |
85 | * @param index The actual parameter index. Input/output parameter. |
| Line 119... | Line 131... | ||
| 119 | * @param name The socket type name. Input parameter. |
131 | * @param name The socket type name. Input parameter. |
| 120 | * @returns The corresponding socket type number. |
132 | * @returns The corresponding socket type number. |
| 121 | */ |
133 | */ |
| 122 | int parse_socket_type( const char * name ); |
134 | int parse_socket_type( const char * name ); |
| 123 | 135 | ||
| - | 136 | /*@}*/ |
|
| - | 137 | ||
| 124 | void print_help( void ){ |
138 | void print_help( void ){ |
| 125 | printf( |
139 | printf( |
| 126 | "Network Echo aplication\n" \ |
140 | "Network Echo aplication\n" \ |
| 127 | "Usage: echo [options]\n" \ |
141 | "Usage: echo [options]\n" \ |
| 128 | "Where options are:\n" \ |
142 | "Where options are:\n" \ |