chargen.c File Reference

Character generator protocol. More...

#include "core/net.h"
#include "std_services/chargen.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   STD_SERVICES_TRACE_LEVEL
 

Functions

error_t tcpChargenStart (void)
 Start TCP chargen service. More...
 
void tcpChargenListenerTask (void *param)
 Task handling connection requests. More...
 
void tcpChargenConnectionTask (void *param)
 TCP chargen service implementation. More...
 
error_t udpChargenStart (void)
 Start UDP chargen service. More...
 
void udpChargenTask (void *param)
 UDP chargen service implementation. More...
 

Variables

const char_t pattern [190]
 

Detailed Description

Character generator protocol.

License

Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Description

The character generator service is a useful debugging and measurement tool. The service simply sends data until the calling user terminates the connection. Refer to RFC 864 for complete details

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file chargen.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   STD_SERVICES_TRACE_LEVEL

Definition at line 36 of file chargen.c.

Function Documentation

◆ tcpChargenConnectionTask()

void tcpChargenConnectionTask ( void *  param)

TCP chargen service implementation.

Parameters
[in]paramPointer to the chargen service context

Definition at line 200 of file chargen.c.

◆ tcpChargenListenerTask()

void tcpChargenListenerTask ( void *  param)

Task handling connection requests.

Parameters
[in]paramPointer to the chargen service context

Definition at line 126 of file chargen.c.

◆ tcpChargenStart()

error_t tcpChargenStart ( void  )

Start TCP chargen service.

Returns
Error code

Definition at line 64 of file chargen.c.

◆ udpChargenStart()

error_t udpChargenStart ( void  )

Start UDP chargen service.

Returns
Error code

Definition at line 277 of file chargen.c.

◆ udpChargenTask()

void udpChargenTask ( void *  param)

UDP chargen service implementation.

Parameters
[in]paramPointer to the chargen service context

Definition at line 346 of file chargen.c.

Variable Documentation

◆ pattern

const char_t pattern[190]
Initial value:
=
{
'!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F',
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y',
'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', ' ',
'!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F',
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y',
'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', ' '
}

Definition at line 44 of file chargen.c.