Changeset 59ecd4a3 in mainline for uspace/app


Ignore:
Timestamp:
2010-04-04T21:41:47Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5db9084
Parents:
36a75a2 (diff), ee7e82a9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
uspace/app
Files:
78 added
1 edited
14 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/Makefile

    r36a75a2 r59ecd4a3  
    2929
    3030USPACE_PREFIX = ../..
    31 LIBS = $(LIB_PREFIX)/block/libblock.a $(LIB_PREFIX)/clui/libclui.a
    32 EXTRA_CFLAGS = -I$(LIB_PREFIX)/block -I$(LIB_PREFIX)/clui -I. -Icmds/ \
    33     -Icmds/builtins -Icmds/modules
     31LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBCLUI_PREFIX)/libclui.a
     32EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBCLUI_PREFIX) -I. -Icmds/ \
     33        -Icmds/builtins -Icmds/modules
    3434BINARY = bdsh
    3535
  • uspace/app/netecho/Makefile

    r36a75a2 r59ecd4a3  
    2828#
    2929
    30 NET_BASE = ..
    31 USPACE_PREFIX = ../../..
    32 LIBRARY = libsocket
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBSOCKET_PREFIX)/libsocket.a
     32EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include
     33BINARY = netecho
    3334
    3435SOURCES = \
    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
    3939
    4040include $(USPACE_PREFIX)/Makefile.common
  • uspace/app/netecho/netecho.c

    r36a75a2 r59ecd4a3  
    2727 */
    2828
    29 /** @addtogroup echo
     29/** @addtogroup netecho
    3030 *  @{
    3131 */
    3232
    3333/** @file
    34  *  Echo application.
     34 *  Network echo application.
    3535 *  Answers received packets.
    3636 */
     
    4141#include <task.h>
    4242
    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"
    5655
    5756/** Prints the application help.
  • uspace/app/netecho/parse.c

    r36a75a2 r59ecd4a3  
    3838#include <str.h>
    3939
    40 #include "../include/socket.h"
    41 
    42 #include "../err.h"
     40#include <socket.h>
     41#include <net_err.h>
    4342
    4443#include "parse.h"
  • uspace/app/netecho/parse.h

    r36a75a2 r59ecd4a3  
    3838#define __NET_APP_PARSE__
    3939
    40 #include "../include/socket.h"
     40#include <socket.h>
    4141
    4242/** Translates the character string to the address family number.
     
    4545 *  @returns EAFNOSUPPORTED if the address family is not supported.
    4646 */
    47 int parse_address_family(const char * name);
     47extern int parse_address_family(const char * name);
    4848
    4949/** Parses the next parameter as an integral number.
     
    6060 *  @returns EINVAL if the parameter is in wrong format.
    6161 */
    62 int parse_parameter_int(int argc, char ** argv, int * index, int * value, const char * name, int offset);
     62extern int parse_parameter_int(int argc, char ** argv, int * index, int * value, const char * name, int offset);
    6363
    6464/** Parses the next named parameter as an integral number.
     
    7878 *  @returns ENOENT if the parameter name has not been found.
    7979 */
    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));
     80extern int parse_parameter_name_int(int argc, char ** argv, int * index, int * value, const char * name, int offset, int (*parse_value)(const char * value));
    8181
    8282/** Parses the next parameter as a character string.
     
    9393 *  @returns EINVAL if the parameter is missing.
    9494 */
    95 int parse_parameter_string(int argc, char ** argv, int * index, char ** value, const char * name, int offset);
     95extern int parse_parameter_string(int argc, char ** argv, int * index, char ** value, const char * name, int offset);
    9696
    9797/** Translates the character string to the protocol family number.
     
    100100 *  @returns EPFNOSUPPORTED if the protocol family is not supported.
    101101 */
    102 int parse_protocol_family(const char * name);
     102extern int parse_protocol_family(const char * name);
    103103
    104104/** Translates the character string to the socket type number.
     
    107107 *  @returns ESOCKNOSUPPORTED if the socket type is not supported.
    108108 */
    109 int parse_socket_type(const char * name);
     109extern int parse_socket_type(const char * name);
    110110
    111111/** Prints the parameter unrecognized message and the application help.
     
    113113 *  @param[in] parameter The parameter name.
    114114 */
    115 void print_unrecognized(int index, const char * parameter);
     115extern void print_unrecognized(int index, const char * parameter);
    116116
    117117#endif
  • uspace/app/netecho/print_error.c

    r36a75a2 r59ecd4a3  
    3737#include <stdio.h>
    3838
    39 #include "../include/icmp_codes.h"
    40 #include "../include/socket_errno.h"
     39#include <icmp_codes.h>
     40#include <socket_errno.h>
    4141
    4242#include "print_error.h"
  • uspace/app/netecho/print_error.h

    r36a75a2 r59ecd4a3  
    5656 *  @param[in] suffix The error description suffix. May be NULL.
    5757 */
    58 void icmp_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);
     58extern void icmp_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);
    5959
    6060/** Prints the error description.
     
    6565 *  @param[in] suffix The error description suffix. May be NULL.
    6666 */
    67 void print_error(FILE * output, int error_code, const char * prefix, const char * suffix);
     67extern void print_error(FILE * output, int error_code, const char * prefix, const char * suffix);
    6868
    6969/** Prints the specific socket error description.
     
    7373 *  @param[in] suffix The error description suffix. May be NULL.
    7474 */
    75 void socket_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);
     75extern void socket_print_error(FILE * output, int error_code, const char * prefix, const char * suffix);
    7676
    7777#endif
  • uspace/app/nettest1/Makefile

    r36a75a2 r59ecd4a3  
    2828#
    2929
    30 NET_BASE = ../..
    31 USPACE_PREFIX = ../../../..
    32 LIBS = $(NET_BASE)/socket/libsocket.a
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBSOCKET_PREFIX)/libsocket.a
     32EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include
    3333BINARY = nettest1
    3434
    3535SOURCES = \
    3636        nettest1.c \
    37         $(NET_BASE)/app/nettest.c \
    38         $(NET_BASE)/app/parse.c \
    39         $(NET_BASE)/app/print_error.c
     37        nettest.c \
     38        parse.c \
     39        print_error.c
    4040
    4141include $(USPACE_PREFIX)/Makefile.common
  • uspace/app/nettest1/nettest.c

    r36a75a2 r59ecd4a3  
    3737#include <stdio.h>
    3838
    39 #include "../include/socket.h"
    40 
    41 #include "../err.h"
     39#include <socket.h>
     40#include <net_err.h>
    4241
    4342#include "nettest.h"
  • uspace/app/nettest1/nettest.h

    r36a75a2 r59ecd4a3  
    3838#define __NET_TEST__
    3939
    40 #include "../include/socket.h"
     40#include <socket.h>
    4141
    4242/** Prints a mark.
     
    4444 *  @param[in] index The index of the mark to be printed.
    4545 */
    46 void print_mark(int index);
     46extern void print_mark(int index);
    4747
    4848/** Creates new sockets.
     
    5555 *  @returns Other error codes as defined for the socket() function.
    5656 */
    57 int sockets_create(int verbose, int * socket_ids, int sockets, int family, sock_type_t type);
     57extern int sockets_create(int verbose, int * socket_ids, int sockets, int family, sock_type_t type);
    5858
    5959/** Closes sockets.
     
    6464 *  @returns Other error codes as defined for the closesocket() function.
    6565 */
    66 int sockets_close(int verbose, int * socket_ids, int sockets);
     66extern int sockets_close(int verbose, int * socket_ids, int sockets);
    6767
    6868/** Connects sockets.
     
    7575 *  @returns Other error codes as defined for the connect() function.
    7676 */
    77 int sockets_connect(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen);
     77extern int sockets_connect(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen);
    7878
    7979/** Sends data via sockets.
     
    8989 *  @returns Other error codes as defined for the sendto() function.
    9090 */
    91 int sockets_sendto(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen, char * data, int size, int messages);
     91extern int sockets_sendto(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t addrlen, char * data, int size, int messages);
    9292
    9393/** Receives data via sockets.
     
    103103 *  @returns Other error codes as defined for the recvfrom() function.
    104104 */
    105 int sockets_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);
     105extern int sockets_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);
    106106
    107107/** Sends and receives data via sockets.
     
    119119 *  @returns Other error codes as defined for the recvfrom() function.
    120120 */
    121 int sockets_sendto_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);
     121extern int sockets_sendto_recvfrom(int verbose, int * socket_ids, int sockets, struct sockaddr * address, socklen_t * addrlen, char * data, int size, int messages);
    122122
    123123#endif
  • uspace/app/nettest1/nettest1.c

    r36a75a2 r59ecd4a3  
    4141#include <time.h>
    4242
    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"
    5352
    5453/** Echo module name.
  • uspace/app/nettest2/Makefile

    r36a75a2 r59ecd4a3  
    2828#
    2929
    30 NET_BASE = ../..
    31 USPACE_PREFIX = ../../../..
    32 LIBS = $(NET_BASE)/socket/libsocket.a
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBSOCKET_PREFIX)/libsocket.a
     32EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include
    3333BINARY = nettest2
    3434
    3535SOURCES = \
    3636        nettest2.c \
    37         $(NET_BASE)/app/nettest.c \
    38         $(NET_BASE)/app/parse.c \
    39         $(NET_BASE)/app/print_error.c
     37        nettest.c \
     38        parse.c \
     39        print_error.c
    4040
    4141include $(USPACE_PREFIX)/Makefile.common
  • uspace/app/nettest2/nettest2.c

    r36a75a2 r59ecd4a3  
    4141#include <time.h>
    4242
    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"
    5352
    5453/** Echo module name.
  • uspace/app/ping/Makefile

    r36a75a2 r59ecd4a3  
    2828#
    2929
    30 NET_BASE = ../..
    31 USPACE_PREFIX = ../../../..
    32 LIBS = $(NET_BASE)/socket/libsocket.a
    33 BINARY = echo
     30USPACE_PREFIX = ../..
     31LIBS = $(LIBSOCKET_PREFIX)/libsocket.a
     32EXTRA_CFLAGS = -I$(LIBSOCKET_PREFIX)/include
     33BINARY = ping
    3434
    3535SOURCES = \
    36         echo.c \
    37         $(NET_BASE)/app/parse.c \
    38         $(NET_BASE)/app/print_error.c
     36        ping.c \
     37        parse.c \
     38        print_error.c
    3939
    4040include $(USPACE_PREFIX)/Makefile.common
  • uspace/app/ping/ping.c

    r36a75a2 r59ecd4a3  
    4242#include <ipc/services.h>
    4343
    44 #include "../../include/icmp_api.h"
    45 #include "../../include/in.h"
    46 #include "../../include/in6.h"
    47 #include "../../include/inet.h"
    48 #include "../../include/ip_codes.h"
    49 #include "../../include/socket_errno.h"
    50 
    51 #include "../../err.h"
    52 
    53 #include "../parse.h"
    54 #include "../print_error.h"
     44#include <icmp_api.h>
     45#include <in.h>
     46#include <in6.h>
     47#include <inet.h>
     48#include <ip_codes.h>
     49#include <socket_errno.h>
     50#include <net_err.h>
     51
     52#include "parse.h"
     53#include "print_error.h"
    5554
    5655/** Echo module name.
Note: See TracChangeset for help on using the changeset viewer.