#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <str.h>
#include <task.h>
#include <arg_parse.h>
#include <net/in.h>
#include <net/in6.h>
#include <net/inet.h>
#include <net/socket.h>
#include <net/socket_parse.h>
#include "print_error.h"
Go to the source code of this file.
Defines | |
| #define | NAME "netecho" |
Functions | |
| static void | echo_print_help (void) |
| int | main (int argc, char *argv[]) |
| static int | netecho_parse_option (int argc, char *argv[], int *index) |
| static int | netecho_socket_process_message (int listening_id) |
| Echo one message (accept one connection and echo message). | |
Variables | |
| static int | backlog = 3 |
| static int | count = -1 |
| static char * | data |
| static int | family = PF_INET |
| static uint16_t | port = 7 |
| static char * | reply = NULL |
| static size_t | reply_length |
| static size_t | size = 1024 |
| static sock_type_t | type = SOCK_DGRAM |
| static int | verbose = 0 |
Sockets-based server that echoes incomming messages. If stream mode is selected, accepts incoming connections.
Definition in file netecho.c.
1.4.7