standardization pass: trim_right (trailing whitespaces)

This commit is contained in:
Joseph Henry
2017-09-13 23:21:15 -07:00
parent 48a07c32a1
commit 476f162a19
3 changed files with 16 additions and 15 deletions

View File

@@ -100,7 +100,7 @@
#else #else
#define DEBUG_ERROR(fmt, args...) #define DEBUG_ERROR(fmt, args...)
#endif #endif
#if ZT_DEBUG_LEVEL >= ZT_MSG_INFO #if ZT_DEBUG_LEVEL >= ZT_MSG_INFO
#if defined(__ANDROID__) #if defined(__ANDROID__)
#define DEBUG_INFO(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, ZT_LOG_TAG, \ #define DEBUG_INFO(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, ZT_LOG_TAG, \
@@ -154,7 +154,7 @@
#if ZT_DEBUG_LEVEL >= ZT_MSG_FLOW #if ZT_DEBUG_LEVEL >= ZT_MSG_FLOW
#if defined(__ANDROID__) #if defined(__ANDROID__)
#define DEBUG_FLOW(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, ZT_LOG_TAG, \ #define DEBUG_FLOW(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, ZT_LOG_TAG, \
"FLOW : %17s:%5d:%25s: " fmt "\n", ZT_FILENAME, __LINE__, __FUNCTION__, ##args)) "FLOW : %17s:%5d:%25s: " fmt "\n", ZT_FILENAME, __LINE__, __FUNCTION__, ##args))
#else #else
#define DEBUG_FLOW(fmt, args...) fprintf(stderr, "FLOW : %17s:%5d:%25s: " fmt "\n", \ #define DEBUG_FLOW(fmt, args...) fprintf(stderr, "FLOW : %17s:%5d:%25s: " fmt "\n", \
@@ -173,4 +173,4 @@
#define DEBUG_TRANS(fmt, args...) #define DEBUG_TRANS(fmt, args...)
#define DEBUG_EXTRA(fmt, args...) #define DEBUG_EXTRA(fmt, args...)
#define DEBUG_FLOW(fmt, args...) #define DEBUG_FLOW(fmt, args...)
#endif #endif

View File

@@ -49,8 +49,8 @@
#define SIOCGIFINDEX 101 #define SIOCGIFINDEX 101
#define SIOCGIFHWADDR 102 #define SIOCGIFHWADDR 102
// Normally defined in linux/if_packet.h, defined here so we can offer a linux-like // Normally defined in linux/if_packet.h, defined here so we can offer a linux-like
// raw socket API on non-linux platforms // raw socket API on non-linux platforms
struct sockaddr_ll { struct sockaddr_ll {
unsigned short sll_family; /* Always AF_PACKET */ unsigned short sll_family; /* Always AF_PACKET */
unsigned short sll_protocol; /* Physical layer protocol */ unsigned short sll_protocol; /* Physical layer protocol */
@@ -116,7 +116,7 @@ struct zts_ifreq {
#define LWIP_TCP_TIMER_INTERVAL 25 #define LWIP_TCP_TIMER_INTERVAL 25
// How often we check VirtualSocket statuses (in ms) // How often we check VirtualSocket statuses (in ms)
#define LWIP_STATUS_TMR_INTERVAL 500 #define LWIP_STATUS_TMR_INTERVAL 500
// #define LWIP_CHKSUM <your_checksum_routine>, See: RFC1071 for inspiration // #define LWIP_CHKSUM <your_checksum_routine>, See: RFC1071 for inspiration
#endif #endif
@@ -196,15 +196,15 @@ struct zts_ifreq {
// Wait time for socket closure if data is still present in the write queue // Wait time for socket closure if data is still present in the write queue
#define ZT_SDK_CLTIME 60 #define ZT_SDK_CLTIME 60
// After closing a pico_socket, other threads might still try to use the // After closing a pico_socket, other threads might still try to use the
// VirtualSocket object for remaining data I/O, as a safety measure we will wait to // VirtualSocket object for remaining data I/O, as a safety measure we will wait to
// delete this VirtualSocket object until the socket has been closed for some arbitrary // delete this VirtualSocket object until the socket has been closed for some arbitrary
// amount of time and it is safe to assume any clients interacting with this // amount of time and it is safe to assume any clients interacting with this
// socket have read some sort of error code from the API. // socket have read some sort of error code from the API.
#define ZT_VirtualSocket_DELETE_WAIT_TIME 30 // s #define ZT_VirtualSocket_DELETE_WAIT_TIME 30 // s
// Interval for performing cleanup tasks on Tap/Stack objects // Interval for performing cleanup tasks on Tap/Stack objects
#define ZT_HOUSEKEEPING_INTERVAL 10 // s #define ZT_HOUSEKEEPING_INTERVAL 10 // s
// Whether or not we want libzt to shit its pants // Whether or not we want libzt to shit its pants
#define ZT_EXIT_ON_GENERAL_FAIL false #define ZT_EXIT_ON_GENERAL_FAIL false
@@ -400,7 +400,7 @@ int zts_connect(ZT_CONNECT_SIG);
* - nwid = 97afaf1963cc6a90 (10.9.0.0/24) * - nwid = 97afaf1963cc6a90 (10.9.0.0/24)
* - nwid = 23bfae5663c8b188 (192.168.0.0/24) * - nwid = 23bfae5663c8b188 (192.168.0.0/24)
* *
* In order to accept a VirtualSocket on 97afaf1963cc6a90, you * In order to accept a VirtualSocket on 97afaf1963cc6a90, you
* should bind to 10.9.0.0 * should bind to 10.9.0.0
*/ */
int zts_bind(ZT_BIND_SIG); int zts_bind(ZT_BIND_SIG);
@@ -454,7 +454,7 @@ int zts_sethostname(ZT_SETHOSTNAME_SIG);
/** /**
* Close a socket * Close a socket
* TODO: Check that closing a socket immediately after writing doesn't behave in * TODO: Check that closing a socket immediately after writing doesn't behave in
* an undefined manner * an undefined manner
*/ */
int zts_close(ZT_CLOSE_SIG); int zts_close(ZT_CLOSE_SIG);
@@ -513,7 +513,7 @@ ssize_t zts_recvmsg(ZT_RECVMSG_SIG);
* Read bytes from socket onto buffer * Read bytes from socket onto buffer
* - Note, this function isn't strictly necessary, you can * - Note, this function isn't strictly necessary, you can
* use a regular read() call as long as the socket fd was * use a regular read() call as long as the socket fd was
* created via a zts_socket() call. * created via a zts_socket() call.
*/ */
int zts_read(ZT_READ_SIG); int zts_read(ZT_READ_SIG);
@@ -521,7 +521,7 @@ int zts_read(ZT_READ_SIG);
* Write bytes from buffer to socket * Write bytes from buffer to socket
* - Note, this function isn't strictly necessary, you can * - Note, this function isn't strictly necessary, you can
* use a regular write() call as long as the socket fd was * use a regular write() call as long as the socket fd was
* created via a zts_socket() call. * created via a zts_socket() call.
*/ */
int zts_write(ZT_WRITE_SIG); int zts_write(ZT_WRITE_SIG);

View File

@@ -43,13 +43,14 @@
* will be set to standard values. Override anything you dont like! * will be set to standard values. Override anything you dont like!
*/ */
#include "lwip/debug.h" #include "lwip/debug.h"
#include "Debug.hpp"
// IP Protocol version // IP Protocol version
#if defined(LIBZT_IPV6) #if defined(LIBZT_IPV6)
#define LWIP_IPV6 1 #define LWIP_IPV6 1
#define LWIP_IPV4 0 #define LWIP_IPV4 0
#endif #endif
#if defined(LIBZT_IPV4) #if defined(LIBZT_IPV4)
#define LWIP_IPV4 1 #define LWIP_IPV4 1
#define LWIP_IPV6 0 #define LWIP_IPV6 0
#endif #endif