Skip to content

Commit

Permalink
sys/net/application_layer: add telnet_server
Browse files Browse the repository at this point in the history
  • Loading branch information
benemorius committed Aug 17, 2020
1 parent b173313 commit ab97e2d
Show file tree
Hide file tree
Showing 4 changed files with 583 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ endif
ifneq (,$(filter sock_dns,$(USEMODULE)))
DIRS += net/application_layer/dns
endif
ifneq (,$(filter telnet_server,$(USEMODULE)))
DIRS += net/application_layer/telnet_server
endif
ifneq (,$(filter constfs,$(USEMODULE)))
DIRS += fs/constfs
endif
Expand Down
53 changes: 53 additions & 0 deletions sys/include/net/telnet_server.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (C) 2019 Thomas Stilwell <[email protected]>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/

/**
* @defgroup net_telnet_server telnet server
* @ingroup net
*
* @brief telnet server
*
* @{
*
* @file
* @brief telnet server definitions
*
* @author Thomas Stilwell <[email protected]>
*/

#ifndef NET_TELNET_SERVER_H
#define NET_TELNET_SERVER_H

#include <errno.h>
#include <stdint.h>
#include <unistd.h>

#include "net/gnrc/tcp.h"
#include "shell.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief telnet server struct
*/
typedef struct {
uint16_t port;
gnrc_tcp_tcb_t tcb;
const shell_command_t *shell_commands; /* deprecated */
} telnet_server_t;

int telnet_start_server(telnet_server_t * telnet_server);

#ifdef __cplusplus
}
#endif

#endif /* NET_TELNET_SERVER_H */
/** @} */
2 changes: 2 additions & 0 deletions sys/net/application_layer/telnet_server/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MODULE=telnet_server
include $(RIOTBASE)/Makefile.base
Loading

0 comments on commit ab97e2d

Please sign in to comment.