Changeset 849ed54 in mainline for uspace/app/netecho
- Timestamp:
- 2010-03-30T18:39:04Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7553689
- Parents:
- 7d6fe4db
- Location:
- uspace/app/netecho
- Files:
-
- 6 moved
-
Makefile (moved) (moved from uspace/srv/net/socket/Makefile ) (1 diff)
-
netecho.c (moved) (moved from uspace/srv/net/app/echo/echo.c ) (2 diffs)
-
parse.c (moved) (moved from uspace/srv/net/app/parse.c ) (1 diff)
-
parse.h (moved) (moved from uspace/srv/net/app/parse.h ) (8 diffs)
-
print_error.c (moved) (moved from uspace/srv/net/app/print_error.c ) (1 diff)
-
print_error.h (moved) (moved from uspace/srv/net/app/print_error.h ) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/netecho/Makefile
r7d6fe4db r849ed54 28 28 # 29 29 30 NET_BASE = .. 31 USPACE_PREFIX = ../../.. 32 LIBRARY = libsocket 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBSOCKET_PREFIX)/libsocket.a 32 EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include 33 BINARY = netecho 33 34 34 35 SOURCES = \ 35 socket_client.c \ 36 $(NET_BASE)/inet.c \ 37 $(NET_BASE)/modules.c \ 38 $(NET_BASE)/structures/dynamic_fifo.c 36 netecho.c \ 37 parse.c \ 38 print_error.c 39 39 40 40 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/netecho/netecho.c
r7d6fe4db r849ed54 27 27 */ 28 28 29 /** @addtogroup echo29 /** @addtogroup netecho 30 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * Echo application.34 * Network echo application. 35 35 * Answers received packets. 36 36 */ … … 41 41 #include <task.h> 42 42 43 #include "../../include/in.h" 44 #include "../../include/in6.h" 45 #include "../../include/inet.h" 46 #include "../../include/socket.h" 47 48 #include "../../err.h" 49 50 #include "../parse.h" 51 #include "../print_error.h" 52 53 /** Echo module name. 54 */ 55 #define NAME "Echo" 43 #include <in.h> 44 #include <in6.h> 45 #include <inet.h> 46 #include <socket.h> 47 #include <net_err.h> 48 49 #include "parse.h" 50 #include "print_error.h" 51 52 /** Network echo module name. 53 */ 54 #define NAME "Network Echo" 56 55 57 56 /** Prints the application help. -
uspace/app/netecho/parse.c
r7d6fe4db r849ed54 38 38 #include <str.h> 39 39 40 #include "../include/socket.h" 41 42 #include "../err.h" 40 #include <socket.h> 41 #include <net_err.h> 43 42 44 43 #include "parse.h" -
uspace/app/netecho/parse.h
r7d6fe4db r849ed54 38 38 #define __NET_APP_PARSE__ 39 39 40 #include "../include/socket.h"40 #include <socket.h> 41 41 42 42 /** Translates the character string to the address family number. … … 45 45 * @returns EAFNOSUPPORTED if the address family is not supported. 46 46 */ 47 int parse_address_family(const char * name);47 extern int parse_address_family(const char * name); 48 48 49 49 /** Parses the next parameter as an integral number. … … 60 60 * @returns EINVAL if the parameter is in wrong format. 61 61 */ 62 int parse_parameter_int(int argc, char ** argv, int * index, int * value, const char * name, int offset);62 extern int parse_parameter_int(int argc, char ** argv, int * index, int * value, const char * name, int offset); 63 63 64 64 /** Parses the next named parameter as an integral number. … … 78 78 * @returns ENOENT if the parameter name has not been found. 79 79 */ 80 int parse_parameter_name_int(int argc, char ** argv, int * index, int * value, const char * name, int offset, int (*parse_value)(const char * value));80 extern int parse_parameter_name_int(int argc, char ** argv, int * index, int * value, const char * name, int offset, int (*parse_value)(const char * value)); 81 81 82 82 /** Parses the next parameter as a character string. … … 93 93 * @returns EINVAL if the parameter is missing. 94 94 */ 95 int parse_parameter_string(int argc, char ** argv, int * index, char ** value, const char * name, int offset);95 extern int parse_parameter_string(int argc, char ** argv, int * index, char ** value, const char * name, int offset); 96 96 97 97 /** Translates the character string to the protocol family number. … … 100 100 * @returns EPFNOSUPPORTED if the protocol family is not supported. 101 101 */ 102 int parse_protocol_family(const char * name);102 extern int parse_protocol_family(const char * name); 103 103 104 104 /** Translates the character string to the socket type number. … … 107 107 * @returns ESOCKNOSUPPORTED if the socket type is not supported. 108 108 */ 109 int parse_socket_type(const char * name);109 extern int parse_socket_type(const char * name); 110 110 111 111 /** Prints the parameter unrecognized message and the application help. … … 113 113 * @param[in] parameter The parameter name. 114 114 */ 115 void print_unrecognized(int index, const char * parameter);115 extern void print_unrecognized(int index, const char * parameter); 116 116 117 117 #endif -
uspace/app/netecho/print_error.c
r7d6fe4db r849ed54 37 37 #include <stdio.h> 38 38 39 #include "../include/icmp_codes.h"40 #include "../include/socket_errno.h"39 #include <icmp_codes.h> 40 #include <socket_errno.h> 41 41 42 42 #include "print_error.h" -
uspace/app/netecho/print_error.h
r7d6fe4db r849ed54 56 56 * @param[in] suffix The error description suffix. May be NULL. 57 57 */ 58 void icmp_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);58 extern void icmp_print_error(FILE * output, int error_code, const char * prefix, const char * suffix); 59 59 60 60 /** Prints the error description. … … 65 65 * @param[in] suffix The error description suffix. May be NULL. 66 66 */ 67 void print_error(FILE * output, int error_code, const char * prefix, const char * suffix);67 extern void print_error(FILE * output, int error_code, const char * prefix, const char * suffix); 68 68 69 69 /** Prints the specific socket error description. … … 73 73 * @param[in] suffix The error description suffix. May be NULL. 74 74 */ 75 void socket_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);75 extern void socket_print_error(FILE * output, int error_code, const char * prefix, const char * suffix); 76 76 77 77 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
