Move several port number #defines to iana.h

This commit is contained in:
Dirk Ziegelmeier
2017-08-08 11:37:08 +02:00
parent 5193844ac4
commit 0eb8d19e82
12 changed files with 43 additions and 34 deletions

View File

@@ -42,6 +42,7 @@
#define LWIP_HDR_APPS_HTTPD_OPTS_H
#include "lwip/opt.h"
#include "lwip/prot/iana.h"
/**
* @defgroup httpd_opts Options
@@ -129,12 +130,12 @@
/** The server port for HTTPD to use */
#if !defined HTTPD_SERVER_PORT || defined __DOXYGEN__
#define HTTPD_SERVER_PORT 80
#define HTTPD_SERVER_PORT LWIP_IANA_PORT_HTTP
#endif
/** The https server port for HTTPD to use */
#if !defined HTTPD_SERVER_PORT_HTTPS || defined __DOXYGEN__
#define HTTPD_SERVER_PORT_HTTPS 443
#define HTTPD_SERVER_PORT_HTTPS LWIP_IANA_PORT_HTTPS
#endif
/** Enable https support? */

View File

@@ -40,6 +40,7 @@
#include "lwip/apps/mqtt_opts.h"
#include "lwip/err.h"
#include "lwip/ip_addr.h"
#include "lwip/prot/iana.h"
#ifdef __cplusplus
extern "C" {
@@ -53,10 +54,10 @@ struct altcp_tls_config;
/** @ingroup mqtt
* Default MQTT port (non-TLS) */
#define MQTT_PORT 1883
#define MQTT_PORT LWIP_IANA_PORT_MQTT
/** @ingroup mqtt
* Default MQTT TLS port */
#define MQTT_TLS_PORT 8883
#define MQTT_TLS_PORT LWIP_IANA_PORT_SEQURE_MQTT
/*---------------------------------------------------------------------------------------------- */
/* Connection with server */

View File

@@ -3,11 +3,12 @@
#include "lwip/apps/smtp_opts.h"
#include "lwip/err.h"
#include "lwip/prot/iana.h"
/** The default TCP port used for SMTP */
#define SMTP_DEFAULT_PORT 25
#define SMTP_DEFAULT_PORT LWIP_IANA_PORT_SMTP
/** The default TCP port used for SMTPS */
#define SMTPS_DEFAULT_PORT 465
#define SMTPS_DEFAULT_PORT LWIP_IANA_PORT_SMTPS
/** Email successfully sent */
#define SMTP_RESULT_OK 0

View File

@@ -38,6 +38,7 @@
#define LWIP_HDR_APPS_SNTP_OPTS_H
#include "lwip/opt.h"
#include "lwip/prot/iana.h"
/**
* @defgroup sntp_opts Options
@@ -83,7 +84,7 @@
/** SNTP server port */
#if !defined SNTP_PORT || defined __DOXYGEN__
#define SNTP_PORT 123
#define SNTP_PORT LWIP_IANA_PORT_SNTP
#endif
/** Sanity check:

View File

@@ -42,6 +42,7 @@
#define LWIP_HDR_APPS_TFTP_OPTS_H
#include "lwip/opt.h"
#include "lwip/prot/iana.h"
/**
* @defgroup tftp_opts Options
@@ -60,7 +61,7 @@
* TFTP server port
*/
#if !defined TFTP_PORT || defined __DOXYGEN__
#define TFTP_PORT 69
#define TFTP_PORT LWIP_IANA_PORT_TFTP
#endif
/**

View File

@@ -43,7 +43,21 @@ extern "C" {
#endif
/** Hardware types */
#define LWIP_IANA_HWTYPE_ETHERNET 1
#define LWIP_IANA_HWTYPE_ETHERNET 1
/** Port numbers */
#define LWIP_IANA_PORT_SMTP 25
#define LWIP_IANA_PORT_TFTP 69
#define LWIP_IANA_PORT_HTTP 80
#define LWIP_IANA_PORT_SNTP 123
#define LWIP_IANA_PORT_NETBIOS 137
#define LWIP_IANA_PORT_SNMP 161
#define LWIP_IANA_PORT_SNMP_TRAP 162
#define LWIP_IANA_PORT_HTTPS 443
#define LWIP_IANA_PORT_SMTPS 465
#define LWIP_IANA_PORT_MQTT 1883
#define LWIP_IANA_PORT_MDNS 5353
#define LWIP_IANA_PORT_SEQURE_MQTT 8883
#ifdef __cplusplus
}