Skip to content

Commit 765b44e

Browse files
committed
Rename from telnetd to telnet
1 parent b7179bb commit 765b44e

File tree

10 files changed

+55
-55
lines changed

10 files changed

+55
-55
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ script:
2626
notifications:
2727
email:
2828
recipients:
29-
- secure: "zqWXLdR9ZJph67wOOkQ7fRW6BY5ZI0hSyn6uwwGYsKq185qBWHOa/2CD0l83hpRj34AYyGdYqbtjC78FIvB0ZcJZuXsqfGjlNtmU3VEp5eZcYfY/mBIuA3GpxIhbF+QFJblLqcj/40y/2om1ICvzQLHITiXMk5o27AHWgR5qbFzO5afSmzNgmV2CEpahI6v3FqPa+L55kNtv2NggpJUrRqsZgAsny9EbiVH0Xt03C1nK9Xem9PbP5XSYPJaIi6vxfZKjaSnffsSj6QHR6fOsWpeYMxscaWlh2ZGRsK6yrAq5XAD/5QO8ZEG6up/m35DrRsaKKYUNemT3xDaaRE+KojR1CI2r0++C8Y0htfexji++xEeRs3IXtIMVUsYxaG5R5wH4nQQ5I0kHkaLsy0lp4nlTBBBP+MNGYuPwPcT26cRRS0OtDmGD9mKVEGJdA/y5YQo4COGlEwO/nTADOUwP8koN1GpPioONjMYn/tDIaXLUaRaxqKzmzryRyJwRX2N8da/s4/p/bHaOv8CdvRj56yC0AKitcxkO4XfFqYhm9IYxW6JkDF5n7DhiYmjC0ISoqiDZp6dV24dGjHYta+J/GqRTGvjr00aAATDW3TteOPOXJxLR3sRWN+on/K55OCN+vY1HrqxV18SzYRVqf1v6JLSQ+T59i5H5Su5+bGBTlwc="
29+
- secure: "vsmdztqdhvF9aYlZ7j3whGFcOqlewwmIHCBiUYsIY8xRPj9W1bznct3g+D7A4Q+3Yvfi3Ag32cZT/e2aMquAygPhkVPbkBLAJrRpj1UPtk6nSk9WgeNJ4SiO8xjB6XAAV4kAJxeVLCbtOqNX+ifDmfDEdAuDiCNUzswe5fq7SVXvV9LHhDXvj4hHtfwMRYIYi2lRDMVvH//zIjMee7sj5Xqr1Y5d/hm2s/hffKFr0pSy3o45aI4De1Gkum91Rr464k3dcp9lArsKN2DsdllqA5xoGT4GQiGDeWr1fZKt1DDN7bvMWlun6hHSMI+IOyXF/uxzsKXrIq7X4d1txRDT2LeAcEyA+YdvMsViXPs8hEeKDWBkbMnAxbKbgDKAhu71J0RS5atTlVic+6sGwas5fE9i54jDstlJU0Bg6AZBZextEkjzU8RLHs6jSbQNYXcVV0tWGt9/ciIU9VBMoDIoXeteeZ13aWvDNXX6w/WT+78uaGjh6KLQC+DNoN0aYsAbWWRuFEgVHPw24nTJIa6HIf8+FnR6rFBCII2yI1PRMEbKrdSWRAK7Oi+5dBvqbbPXIRF3hY1hgYu9rN8/nywv2/dXgahHyW0kgtmONbWK8udLDCT9ofp78FWoTq0mZFf1WtGUcWdnUpBN+7Q3Uaq1rH7fe6D90aG/qTkzp1rTYlk="

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
mcu-uuid-telnetd |Build Status|
2-
===============================
1+
mcu-uuid-telnet |Build Status|
2+
==============================
33

44
Description
55
-----------
@@ -15,10 +15,10 @@ Provides access to a console shell as a telnet server (using the
1515
Documentation
1616
-------------
1717

18-
`Read the documentation <https://mcu-uuid-telnetd.readthedocs.io/>`_
18+
`Read the documentation <https://mcu-uuid-telnet.readthedocs.io/>`_
1919
generated from the docs_ directory.
2020

2121
.. _docs: docs/
2222

23-
.. |Build Status| image:: https://travis-ci.org/nomis/mcu-uuid-telnetd.svg?branch=master
24-
:target: https://travis-ci.org/nomis/mcu-uuid-telnetd
23+
.. |Build Status| image:: https://travis-ci.org/nomis/mcu-uuid-telnet.svg?branch=master
24+
:target: https://travis-ci.org/nomis/mcu-uuid-telnet

docs/changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ Added
2020

2121
.. |--| unicode:: U+2013 .. EN DASH
2222

23-
.. _Unreleased: https://github.com/nomis/mcu-uuid-telnetd/compare/0.1.0...HEAD
24-
.. _0.1.0: https://github.com/nomis/mcu-uuid-telnetd/commits/0.1.0
23+
.. _Unreleased: https://github.com/nomis/mcu-uuid-telnet/compare/0.1.0...HEAD
24+
.. _0.1.0: https://github.com/nomis/mcu-uuid-telnet/commits/0.1.0

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
extensions = []
99
source_suffix = ['.rst']
1010

11-
project = u'mcu-uuid-telnetd'
11+
project = u'mcu-uuid-telnet'
1212
copyright = u'2019, Simon Arlott'
1313
author = u'Simon Arlott'
1414

docs/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
mcu-uuid-telnetd
2-
================
1+
mcu-uuid-telnet
2+
===============
33

44
Description
55
-----------
@@ -36,8 +36,8 @@ Resources
3636
:titlesonly:
3737
:maxdepth: 1
3838

39-
Source code <https://github.com/nomis/mcu-uuid-telnetd>
40-
Releases <https://github.com/nomis/mcu-uuid-telnetd/releases>
41-
Namespace reference <https://mcu-doxygen.uuid.uk/namespaceuuid_1_1telnetd.html>
39+
Source code <https://github.com/nomis/mcu-uuid-telnet>
40+
Releases <https://github.com/nomis/mcu-uuid-telnet/releases>
41+
Namespace reference <https://mcu-doxygen.uuid.uk/namespaceuuid_1_1telnet.html>
4242
changelog
43-
Issue tracker <https://github.com/nomis/mcu-uuid-telnetd/issues>
43+
Issue tracker <https://github.com/nomis/mcu-uuid-telnet/issues>

docs/usage.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Usage
33

44
.. code:: c++
55

6-
#include <uuid/telnetd.h>
6+
#include <uuid/telnet.h>
77

8-
Create a |uuid::telnetd::TelnetService|_ and call |start()|_.
8+
Create a |uuid::telnet::TelnetService|_ and call |start()|_.
99

1010
Call |loop()|_ regularly and when WiFi connectivity is available
1111
connections will be accepted.
@@ -23,14 +23,14 @@ Example
2323

2424
.. literalinclude:: ../examples/DigitalIO.cpp
2525

26-
.. |uuid::telnetd::TelnetService| replace:: ``uuid::telnetd::TelnetService``
27-
.. _uuid::telnetd::TelnetService: https://mcu-doxygen.uuid.uk/classuuid_1_1telnetd_1_1TelnetService.html
26+
.. |uuid::telnet::TelnetService| replace:: ``uuid::telnet::TelnetService``
27+
.. _uuid::telnet::TelnetService: https://mcu-doxygen.uuid.uk/classuuid_1_1telnet_1_1TelnetService.html
2828

2929
.. |start()| replace:: ``start()``
30-
.. _start(): https://mcu-doxygen.uuid.uk/classuuid_1_1telnetd_1_1TelnetService.html#aa3f64dc0c3b0b8f561c004bdeb5dbcb7
30+
.. _start(): https://mcu-doxygen.uuid.uk/classuuid_1_1telnet_1_1TelnetService.html#aa3f64dc0c3b0b8f561c004bdeb5dbcb7
3131

3232
.. |loop()| replace:: ``loop()``
33-
.. _loop(): https://mcu-doxygen.uuid.uk/classuuid_1_1telnetd_1_1TelnetService.html#ab08b97b1afc1a8c82de5fe7dac0d890e
33+
.. _loop(): https://mcu-doxygen.uuid.uk/classuuid_1_1telnet_1_1TelnetService.html#ab08b97b1afc1a8c82de5fe7dac0d890e
3434

3535
.. |uuid::console::Shell::loop_all()| replace:: ``uuid::console::Shell::loop_all()``
3636
.. _uuid::console::Shell::loop_all(): https://mcu-doxygen.uuid.uk/classuuid_1_1console_1_1Shell.html#affe5b4812696a9a53eed1f394301354e

examples/DigitalIO.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
#include <uuid/common.h>
1313
#include <uuid/console.h>
14-
#include <uuid/telnetd.h>
14+
#include <uuid/telnet.h>
1515

1616
using uuid::read_flash_string;
1717
using uuid::flash_string_vector;
1818
using uuid::console::Commands;
1919
using uuid::console::Shell;
2020

2121
static std::shared_ptr<Commands> commands = std::make_shared<Commands>();
22-
static uuid::telnetd::TelnetService telnet{commands};
22+
static uuid::telnet::TelnetService telnet{commands};
2323

2424
void setup() {
2525
commands->add_command(flash_string_vector{F("pinMode")},

src/stream.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* uuid-telnetd - Telnet service
2+
* uuid-telnet - Telnet service
33
* Copyright 2019 Simon Arlott
44
*
55
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
#include "uuid/telnetd.h"
19+
#include "uuid/telnet.h"
2020

2121
#include <Arduino.h>
2222

@@ -26,7 +26,7 @@
2626

2727
namespace uuid {
2828

29-
namespace telnetd {
29+
namespace telnet {
3030

3131
TelnetStream::TelnetStream(WiFiClient &client)
3232
: client_(client) {
@@ -353,6 +353,6 @@ size_t TelnetStream::raw_write(const uint8_t *buffer, size_t size) {
353353
return size;
354354
}
355355

356-
} // namespace telnetd
356+
} // namespace telnet
357357

358358
} // namespace fridge

src/telnetd.cpp renamed to src/telnet.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* uuid-telnetd - Telnet service
2+
* uuid-telnet - Telnet service
33
* Copyright 2019 Simon Arlott
44
*
55
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
#include "uuid/telnetd.h"
19+
#include "uuid/telnet.h"
2020

2121
#include <Arduino.h>
2222
#ifdef ARDUINO_ARCH_ESP8266
@@ -34,35 +34,35 @@
3434
#include <uuid/common.h>
3535
#include <uuid/log.h>
3636

37-
#ifndef UUID_TELNETD_HAVE_WIFICLIENT_REMOTE
37+
#ifndef UUID_TELNET_HAVE_WIFICLIENT_REMOTE
3838
# if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
39-
# define UUID_TELNETD_HAVE_WIFICLIENT_REMOTE 1
39+
# define UUID_TELNET_HAVE_WIFICLIENT_REMOTE 1
4040
# else
41-
# define UUID_TELNETD_HAVE_WIFICLIENT_REMOTE 0
41+
# define UUID_TELNET_HAVE_WIFICLIENT_REMOTE 0
4242
# endif
4343
#endif
4444

45-
#ifndef UUID_TELNETD_HAVE_WIFICLIENT_NODELAY
45+
#ifndef UUID_TELNET_HAVE_WIFICLIENT_NODELAY
4646
# if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
47-
# define UUID_TELNETD_HAVE_WIFICLIENT_NODELAY 1
47+
# define UUID_TELNET_HAVE_WIFICLIENT_NODELAY 1
4848
# else
49-
# define UUID_TELNETD_HAVE_WIFICLIENT_NODELAY 0
49+
# define UUID_TELNET_HAVE_WIFICLIENT_NODELAY 0
5050
# endif
5151
#endif
5252

53-
#ifndef UUID_TELNETD_HAVE_WIFICLIENT_KEEPALIVE
53+
#ifndef UUID_TELNET_HAVE_WIFICLIENT_KEEPALIVE
5454
# if defined(ARDUINO_ARCH_ESP8266)
55-
# define UUID_TELNETD_HAVE_WIFICLIENT_KEEPALIVE 1
55+
# define UUID_TELNET_HAVE_WIFICLIENT_KEEPALIVE 1
5656
# else
57-
# define UUID_TELNETD_HAVE_WIFICLIENT_KEEPALIVE 0
57+
# define UUID_TELNET_HAVE_WIFICLIENT_KEEPALIVE 0
5858
# endif
5959
#endif
6060

61-
static const char __pstr__logger_name[] __attribute__((__aligned__(sizeof(int)))) PROGMEM = "telnetd";
61+
static const char __pstr__logger_name[] __attribute__((__aligned__(sizeof(int)))) PROGMEM = "telnet";
6262

6363
namespace uuid {
6464

65-
namespace telnetd {
65+
namespace telnet {
6666

6767
uuid::log::Logger TelnetService::logger_{FPSTR(__pstr__logger_name), uuid::log::Facility::DAEMON};
6868

@@ -152,19 +152,19 @@ void TelnetService::loop() {
152152
WiFiClient client = server_.available();
153153
if (client) {
154154
if (connections_.size() >= maximum_connections_) {
155-
#if UUID_TELNETD_HAVE_WIFICLIENT_REMOTE
155+
#if UUID_TELNET_HAVE_WIFICLIENT_REMOTE
156156
logger_.info(F("New connection from [%s]:%u rejected (connection limit reached)"), uuid::printable_to_string(client.remoteIP()).c_str(), client.remotePort());
157157
#else
158158
logger_.info(F("New connection rejected (connection limit reached)"));
159159
#endif
160160
client.println(F("Maximum connection limit reached."));
161161
client.stop();
162162
} else {
163-
#if UUID_TELNETD_HAVE_WIFICLIENT_REMOTE
163+
#if UUID_TELNET_HAVE_WIFICLIENT_REMOTE
164164
logger_.info(F("New connection from [%s]:%u accepted"), uuid::printable_to_string(client.remoteIP()).c_str(), client.remotePort());
165165
#endif
166166
connections_.emplace_back(shell_factory_, std::move(client), initial_idle_timeout_, write_timeout_);
167-
#if !(UUID_TELNETD_HAVE_WIFICLIENT_REMOTE)
167+
#if !(UUID_TELNET_HAVE_WIFICLIENT_REMOTE)
168168
logger_.info(F("New connection %p accepted"), &connections_.back());
169169
#endif
170170
}
@@ -173,19 +173,19 @@ void TelnetService::loop() {
173173

174174
TelnetService::Connection::Connection(shell_factory_function &shell_factory, WiFiClient &&client, unsigned long idle_timeout, unsigned long write_timeout)
175175
: client_(std::move(client)), stream_(client_) {
176-
#if UUID_TELNETD_HAVE_WIFICLIENT_REMOTE
176+
#if UUID_TELNET_HAVE_WIFICLIENT_REMOTE
177177
// These have to be copied because they're not accessible on closed connections
178178
addr_ = client_.remoteIP();
179179
port_ = client_.remotePort();
180180
#else
181181
port_ = 0;
182182
#endif
183183

184-
#if UUID_TELNETD_HAVE_WIFICLIENT_NODELAY
184+
#if UUID_TELNET_HAVE_WIFICLIENT_NODELAY
185185
client_.setNoDelay(true);
186186
#endif
187187

188-
#if UUID_TELNETD_HAVE_WIFICLIENT_KEEPALIVE
188+
#if UUID_TELNET_HAVE_WIFICLIENT_KEEPALIVE
189189
// Disconnect after 30 seconds without a response
190190
client_.keepAlive(5, 5, 5);
191191
#endif
@@ -217,7 +217,7 @@ bool TelnetService::Connection::loop() {
217217
}
218218
return true;
219219
} else {
220-
#if UUID_TELNETD_HAVE_WIFICLIENT_REMOTE
220+
#if UUID_TELNET_HAVE_WIFICLIENT_REMOTE
221221
logger_.info(F("Connection from [%s]:%u closed"), uuid::printable_to_string(addr_).c_str(), port_);
222222
#else
223223
logger_.info(F("Connection %p closed"), this);
@@ -232,6 +232,6 @@ void TelnetService::Connection::stop() {
232232
}
233233
}
234234

235-
} // namespace telnetd
235+
} // namespace telnet
236236

237237
} // namespace fridge

src/uuid/telnetd.h renamed to src/uuid/telnet.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* uuid-telnetd - Telnet service
2+
* uuid-telnet - Telnet service
33
* Copyright 2019 Simon Arlott
44
*
55
* This program is free software: you can redistribute it and/or modify
@@ -16,8 +16,8 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
#ifndef UUID_TELNETD_H_
20-
#define UUID_TELNETD_H_
19+
#ifndef UUID_TELNET_H_
20+
#define UUID_TELNET_H_
2121

2222
#include <Arduino.h>
2323
#ifdef ARDUINO_ARCH_ESP8266
@@ -40,10 +40,10 @@ namespace uuid {
4040
/**
4141
* Telnet service.
4242
*
43-
* - <a href="https://github.com/nomis/mcu-uuid-telnetd/">Git Repository</a>
44-
* - <a href="https://mcu-uuid-telnetd.readthedocs.io/">Documentation</a>
43+
* - <a href="https://github.com/nomis/mcu-uuid-telnet/">Git Repository</a>
44+
* - <a href="https://mcu-uuid-telnet.readthedocs.io/">Documentation</a>
4545
*/
46-
namespace telnetd {
46+
namespace telnet {
4747

4848
/**
4949
* Stream wrapper that performs telnet protocol handling, option
@@ -434,7 +434,7 @@ class TelnetService {
434434
unsigned long write_timeout_ = DEFAULT_WRITE_TIMEOUT; /*!< Write timeout (in milliseconds). @since 0.1.0 */
435435
};
436436

437-
} // namespace telnetd
437+
} // namespace telnet
438438

439439
} // namespace uuid
440440

0 commit comments

Comments
 (0)