Changeset 849ed54 in mainline for uspace/app/nettest1
- 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/nettest1
- Files:
-
- 4 added
- 4 moved
-
Makefile (moved) (moved from uspace/srv/net/app/nettest1/Makefile ) (1 diff)
-
nettest.c (moved) (moved from uspace/srv/net/app/nettest.c ) (1 diff)
-
nettest.h (moved) (moved from uspace/srv/net/app/nettest.h ) (8 diffs)
-
nettest1.c (moved) (moved from uspace/srv/net/app/nettest1/nettest1.c ) (1 diff)
-
parse.c (added)
-
parse.h (added)
-
print_error.c (added)
-
print_error.h (added)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nettest1/Makefile
r7d6fe4db r849ed54 28 28 # 29 29 30 NET_BASE= ../..31 USPACE_PREFIX = ../../../.. 32 LIBS = $(NET_BASE)/socket/libsocket.a 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBSOCKET_PREFIX)/libsocket.a 32 EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include 33 33 BINARY = nettest1 34 34 35 35 SOURCES = \ 36 36 nettest1.c \ 37 $(NET_BASE)/app/nettest.c \38 $(NET_BASE)/app/parse.c \39 $(NET_BASE)/app/print_error.c37 nettest.c \ 38 parse.c \ 39 print_error.c 40 40 41 41 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/nettest1/nettest.c
r7d6fe4db r849ed54 37 37 #include <stdio.h> 38 38 39 #include "../include/socket.h" 40 41 #include "../err.h" 39 #include <socket.h> 40 #include <net_err.h> 42 41 43 42 #include "nettest.h" -
uspace/app/nettest1/nettest.h
r7d6fe4db r849ed54 38 38 #define __NET_TEST__ 39 39 40 #include "../include/socket.h"40 #include <socket.h> 41 41 42 42 /** Prints a mark. … … 44 44 * @param[in] index The index of the mark to be printed. 45 45 */ 46 void print_mark(int index);46 extern void print_mark(int index); 47 47 48 48 /** Creates new sockets. … … 55 55 * @returns Other error codes as defined for the socket() function. 56 56 */ 57 int sockets_create(int verbose, int * socket_ids, int sockets, int family, sock_type_t type);57 extern int sockets_create(int verbose, int * socket_ids, int sockets, int family, sock_type_t type); 58 58 59 59 /** Closes sockets. … … 64 64 * @returns Other error codes as defined for the closesocket() function. 65 65 */ 66 int sockets_close(int verbose, int * socket_ids, int sockets);66 extern int sockets_close(int verbose, int * socket_ids, int sockets); 67 67 68 68 /** Connects sockets. … … 75 75 * @returns Other error codes as defined for the connect() function. 76 76 */ 77 int sockets_connect(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen);77 extern int sockets_connect(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen); 78 78 79 79 /** Sends data via sockets. … … 89 89 * @returns Other error codes as defined for the sendto() function. 90 90 */ 91 int sockets_sendto(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen, char * data, int size, int messages);91 extern int sockets_sendto(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen, char * data, int size, int messages); 92 92 93 93 /** Receives data via sockets. … … 103 103 * @returns Other error codes as defined for the recvfrom() function. 104 104 */ 105 int sockets_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);105 extern int sockets_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages); 106 106 107 107 /** Sends and receives data via sockets. … … 119 119 * @returns Other error codes as defined for the recvfrom() function. 120 120 */ 121 int sockets_sendto_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);121 extern int sockets_sendto_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages); 122 122 123 123 #endif -
uspace/app/nettest1/nettest1.c
r7d6fe4db r849ed54 41 41 #include <time.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 "../nettest.h" 51 #include "../parse.h" 52 #include "../print_error.h" 43 #include <in.h> 44 #include <in6.h> 45 #include <inet.h> 46 #include <socket.h> 47 #include <net_err.h> 48 49 #include "nettest.h" 50 #include "parse.h" 51 #include "print_error.h" 53 52 54 53 /** Echo module name.
Note:
See TracChangeset
for help on using the changeset viewer.
