LWIP 2.0.0 adaptations, formatted debug outputs
This commit is contained in:
@@ -38,6 +38,27 @@
|
||||
#define MSG_EXTRA 4 // If nothing in your world makes sense
|
||||
|
||||
#define __SHOW_FILENAMES__ true
|
||||
#define __SHOW_COLOR__ true
|
||||
|
||||
#if defined(__SHOW_COLOR__)
|
||||
#define RED "\x1B[31m"
|
||||
#define GRN "\x1B[32m"
|
||||
#define YEL "\x1B[33m"
|
||||
#define BLU "\x1B[34m"
|
||||
#define MAG "\x1B[35m"
|
||||
#define CYN "\x1B[36m"
|
||||
#define WHT "\x1B[37m"
|
||||
#define RESET "\x1B[0m"
|
||||
#else
|
||||
#define RED
|
||||
#define GRN
|
||||
#define YEL
|
||||
#define BLU
|
||||
#define MAG
|
||||
#define CYN
|
||||
#define WHT
|
||||
#define RESET
|
||||
#endif
|
||||
|
||||
// filenames
|
||||
#if __SHOW_FILENAMES__
|
||||
@@ -62,17 +83,18 @@ extern "C" {
|
||||
|
||||
//#if defined(SDK_DEBUG)
|
||||
#if DEBUG_LEVEL >= MSG_ERROR
|
||||
#define DEBUG_ERROR(fmt, args...) fprintf(stderr, "ZT_ERROR: %s:%d:%s(): " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args)
|
||||
#define DEBUG_ERROR(fmt, args...) fprintf(stderr, RED"ZT_ERROR: %20s:%4d:%20s: " fmt "\n"RESET, __FILENAME__, __LINE__, __FUNCTION__, ##args)
|
||||
#else
|
||||
#define DEBUG_ERROR(fmt, args...)
|
||||
#endif
|
||||
#if DEBUG_LEVEL >= MSG_INFO
|
||||
#if defined(__ANDROID__)
|
||||
#define DEBUG_INFO(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_INFO : %s:%d:%s(): " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
|
||||
#define DEBUG_BLANK(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_INFO : %s:%d:" fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
|
||||
#define DEBUG_INFO(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_INFO : %20s:%4d:%20s: " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
|
||||
#define DEBUG_BLANK(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_INFO : %20s:%4d:" fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
|
||||
#else
|
||||
#define DEBUG_INFO(fmt, args...) fprintf(stderr, "ZT_INFO : %s:%d:%s(): " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args)
|
||||
#define DEBUG_BLANK(fmt, args...) fprintf(stderr, "ZT_INFO : %s:%d:" fmt "\n", __FILENAME__, __LINE__, ##args)
|
||||
#define DEBUG_INFO(fmt, args...) fprintf(stderr, "ZT_INFO : %20s:%4d:%20s: " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args)
|
||||
#define DEBUG_ATTN(fmt, args...) fprintf(stderr, CYN"ZT_INFO : %20s:%4d:%20s: " fmt "\n"RESET, __FILENAME__, __LINE__, __FUNCTION__, ##args)
|
||||
#define DEBUG_BLANK(fmt, args...) fprintf(stderr, "ZT_INFO : %20s:%4d:" fmt "\n", __FILENAME__, __LINE__, ##args)
|
||||
#endif
|
||||
#else
|
||||
#define DEBUG_INFO(fmt, args...)
|
||||
@@ -80,18 +102,18 @@ extern "C" {
|
||||
#endif
|
||||
#if DEBUG_LEVEL >= MSG_TRANSFER
|
||||
#if defined(__ANDROID__)
|
||||
#define DEBUG_TRANS(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_TRANS : %s:%d:%s(): " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
|
||||
#define DEBUG_TRANS(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_TRANS : %20s:%4d:%20s: " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
|
||||
#else
|
||||
#define DEBUG_TRANS(fmt, args...) fprintf(stderr, "ZT_TRANS: %s:%d:%s(): " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args)
|
||||
#define DEBUG_TRANS(fmt, args...) fprintf(stderr, GRN"ZT_TRANS: %20s:%4d:%20s: " fmt "\n"RESET, __FILENAME__, __LINE__, __FUNCTION__, ##args)
|
||||
#endif
|
||||
#else
|
||||
#define DEBUG_TRANS(fmt, args...)
|
||||
#endif
|
||||
#if DEBUG_LEVEL >= MSG_EXTRA
|
||||
#if defined(__ANDROID__)
|
||||
#define DEBUG_EXTRA(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_EXTRA : %s:%d:%s(): " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
|
||||
#define DEBUG_EXTRA(fmt, args...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, "ZT_EXTRA : %20s:%4d:%20s: " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args))
|
||||
#else
|
||||
#define DEBUG_EXTRA(fmt, args...) fprintf(stderr, "ZT_EXTRA: %s:%d:%s(): " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args)
|
||||
#define DEBUG_EXTRA(fmt, args...) fprintf(stderr, "ZT_EXTRA: %20s:%4d:%20s: " fmt "\n", __FILENAME__, __LINE__, __FUNCTION__, ##args)
|
||||
#endif
|
||||
#else
|
||||
#define DEBUG_EXTRA(fmt, args...)
|
||||
|
||||
@@ -44,13 +44,19 @@
|
||||
|
||||
#include "SDK_LWIPStack.hpp"
|
||||
|
||||
//#include "lwip/tcp_impl.h"
|
||||
#include "lwip/priv/tcp_priv.h"
|
||||
// LWIP
|
||||
#if defined(LWIP_VERSION_2)
|
||||
//#define LWIPDIR "ext/lwip_2.0.0"
|
||||
#include "lwip/priv/tcp_priv.h"
|
||||
#elif defined (LWIP_VERSION_1)
|
||||
//#define LWIPDIR "ext/lwip_1.4.1"
|
||||
#include "lwip/tcp_impl.h"
|
||||
#include "lwip/ip_frag.h"
|
||||
#endif
|
||||
#include "netif/etharp.h"
|
||||
#include "lwip/api.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
//#include "lwip/ip_frag.h"
|
||||
#include "lwip/tcp.h"
|
||||
#include "lwip/init.h"
|
||||
#include "lwip/mem.h"
|
||||
@@ -61,6 +67,7 @@
|
||||
#include "lwip/tcp.h"
|
||||
|
||||
|
||||
|
||||
#include "SDK.h"
|
||||
#include "SDK_Debug.h"
|
||||
|
||||
@@ -259,7 +266,6 @@ void NetconEthernetTap::put(const MAC &from,const MAC &to,unsigned int etherType
|
||||
struct pbuf *p,*q;
|
||||
if (!_enabled)
|
||||
return;
|
||||
|
||||
struct eth_hdr ethhdr;
|
||||
from.copyTo(ethhdr.src.addr, 6);
|
||||
to.copyTo(ethhdr.dest.addr, 6);
|
||||
@@ -549,11 +555,11 @@ void NetconEthernetTap::phyOnUnixData(PhySocket *sock, void **uptr, void *data,
|
||||
if(detected_rpc) {
|
||||
unloadRPC(data, pid, tid, timestamp, CANARY, cmd, payload);
|
||||
memcpy(&CANARY_num, CANARY, CANARY_SZ);
|
||||
DEBUG_EXTRA(" <sock=%p> RPC: (pid=%d, tid=%d, timestamp=%s, cmd=%d)",
|
||||
DEBUG_EXTRA(" RPC: sock=%p, (pid=%d, tid=%d, timestamp=%s, cmd=%d)",
|
||||
(void*)&sock, pid, tid, timestamp, cmd);
|
||||
|
||||
if(cmd == RPC_SOCKET) {
|
||||
DEBUG_INFO(" <sock=%p> RPC_SOCKET", (void*)&sock);
|
||||
DEBUG_INFO(" RPC_SOCKET, sock=%p", (void*)&sock);
|
||||
// Create new lwip socket and associate it with this sock
|
||||
struct socket_st socket_rpc;
|
||||
memcpy(&socket_rpc, &buf[IDX_PAYLOAD+STRUCT_IDX], sizeof(struct socket_st));
|
||||
@@ -581,7 +587,7 @@ void NetconEthernetTap::phyOnUnixData(PhySocket *sock, void **uptr, void *data,
|
||||
// Find job
|
||||
sockdata = jobmap[CANARY_num];
|
||||
if(!sockdata.first) {
|
||||
DEBUG_ERROR(" <sock=%p> unable to locate job entry for %llu", (void*)&sock, CANARY_num);
|
||||
DEBUG_ERROR(" unable to locate job entry for %llu, sock=%p", CANARY_num, (void*)&sock);
|
||||
return;
|
||||
} else
|
||||
foundJob = true;
|
||||
@@ -643,36 +649,36 @@ void NetconEthernetTap::phyOnUnixData(PhySocket *sock, void **uptr, void *data,
|
||||
rpcSock = sockdata.first;
|
||||
buf = (unsigned char*)sockdata.second;
|
||||
unloadRPC(buf, pid, tid, timestamp, CANARY, cmd, payload);
|
||||
DEBUG_EXTRA(" <sock=%p> RPC: (pid=%d, tid=%d, timestamp=%s, cmd=%d)",
|
||||
DEBUG_EXTRA(" RPC: sock=%p, (pid=%d, tid=%d, timestamp=%s, cmd=%d)",
|
||||
(void*)&sock, pid, tid, timestamp, cmd);
|
||||
|
||||
switch(cmd) {
|
||||
case RPC_BIND:
|
||||
DEBUG_INFO(" <sock=%p> RPC_BIND", (void*)&sock);
|
||||
DEBUG_INFO(" RPC_BIND, sock=%p", (void*)&sock);
|
||||
struct bind_st bind_rpc;
|
||||
memcpy(&bind_rpc, &buf[IDX_PAYLOAD+STRUCT_IDX], sizeof(struct bind_st));
|
||||
handleBind(sock, rpcSock, uptr, &bind_rpc);
|
||||
break;
|
||||
case RPC_LISTEN:
|
||||
DEBUG_INFO(" <sock=%p> RPC_LISTEN", (void*)&sock);
|
||||
DEBUG_INFO(" RPC_LISTEN, sock=%p", (void*)&sock);
|
||||
struct listen_st listen_rpc;
|
||||
memcpy(&listen_rpc, &buf[IDX_PAYLOAD+STRUCT_IDX], sizeof(struct listen_st));
|
||||
handleListen(sock, rpcSock, uptr, &listen_rpc);
|
||||
break;
|
||||
case RPC_GETSOCKNAME:
|
||||
DEBUG_INFO(" <sock=%p> RPC_GETSOCKNAME", (void*)&sock);
|
||||
DEBUG_INFO(" RPC_GETSOCKNAME, sock=%p", (void*)&sock);
|
||||
struct getsockname_st getsockname_rpc;
|
||||
memcpy(&getsockname_rpc, &buf[IDX_PAYLOAD+STRUCT_IDX], sizeof(struct getsockname_st));
|
||||
handleGetsockname(sock, rpcSock, uptr, &getsockname_rpc);
|
||||
break;
|
||||
case RPC_GETPEERNAME:
|
||||
DEBUG_INFO(" <sock=%p> RPC_GETPEERNAME", (void*)&sock);
|
||||
DEBUG_INFO(" RPC_GETPEERNAME, sock=%p", (void*)&sock);
|
||||
struct getsockname_st getpeername_rpc;
|
||||
memcpy(&getpeername_rpc, &buf[IDX_PAYLOAD+STRUCT_IDX], sizeof(struct getsockname_st));
|
||||
handleGetpeername(sock, rpcSock, uptr, &getpeername_rpc);
|
||||
break;
|
||||
case RPC_CONNECT:
|
||||
DEBUG_INFO(" <sock=%p> RPC_CONNECT", (void*)&sock);
|
||||
DEBUG_INFO(" RPC_CONNECT, sock=%p", (void*)&sock);
|
||||
struct connect_st connect_rpc;
|
||||
memcpy(&connect_rpc, &buf[IDX_PAYLOAD+STRUCT_IDX], sizeof(struct connect_st));
|
||||
handleConnect(sock, rpcSock, conn, &connect_rpc);
|
||||
@@ -725,7 +731,7 @@ void NetconEthernetTap::unloadRPC(void *data, pid_t &pid, pid_t &tid,
|
||||
|
||||
err_t NetconEthernetTap::nc_accept(void *arg, struct tcp_pcb *newPCB, err_t err)
|
||||
{
|
||||
DEBUG_INFO("pcb=%p", (void*)&newPCB);
|
||||
DEBUG_ATTN("pcb=%p", (void*)&newPCB);
|
||||
Larg *l = (Larg*)arg;
|
||||
Mutex::Lock _l(l->tap->_tcpconns_m);
|
||||
Connection *conn = l->conn;
|
||||
@@ -903,7 +909,7 @@ err_t NetconEthernetTap::nc_connected_proxy(void *arg, struct tcp_pcb *PCB, err_
|
||||
|
||||
err_t NetconEthernetTap::nc_connected(void *arg, struct tcp_pcb *PCB, err_t err)
|
||||
{
|
||||
DEBUG_INFO("pcb=%p", (void*)&PCB);
|
||||
DEBUG_ATTN("pcb=%p", (void*)&PCB);
|
||||
Larg *l = (Larg*)arg;
|
||||
if(l && l->conn)
|
||||
l->tap->sendReturnValue(l->tap->_phy.getDescriptor(l->conn->rpcSock), ERR_OK);
|
||||
@@ -917,7 +923,7 @@ err_t NetconEthernetTap::nc_poll(void* arg, struct tcp_pcb *PCB)
|
||||
|
||||
void NetconEthernetTap::nc_err(void *arg, err_t err)
|
||||
{
|
||||
DEBUG_INFO("err=%d", err);
|
||||
DEBUG_ERROR("err=%d", err);
|
||||
Larg *l = (Larg*)arg;
|
||||
Mutex::Lock _l(l->tap->_tcpconns_m);
|
||||
|
||||
@@ -1037,17 +1043,19 @@ void NetconEthernetTap::handleBind(PhySocket *sock, PhySocket *rpcSock, void **u
|
||||
return;
|
||||
}
|
||||
|
||||
int ip = rawAddr->sin_addr.s_addr;
|
||||
unsigned char d[4];
|
||||
d[0] = ip & 0xFF;
|
||||
d[1] = (ip >> 8) & 0xFF;
|
||||
d[2] = (ip >> 16) & 0xFF;
|
||||
d[3] = (ip >> 24) & 0xFF;
|
||||
DEBUG_INFO(" addr=%d.%d.%d.%d:%d", d[0],d[1],d[2],d[3], port);
|
||||
|
||||
#if DEBUG_LEVEL >= MSG_TRANSFER
|
||||
int ip = rawAddr->sin_addr.s_addr;
|
||||
unsigned char d[4];
|
||||
d[0] = ip & 0xFF;
|
||||
d[1] = (ip >> 8) & 0xFF;
|
||||
d[2] = (ip >> 16) & 0xFF;
|
||||
d[3] = (ip >> 24) & 0xFF;
|
||||
DEBUG_INFO(" addr=%d.%d.%d.%d:%d", d[0],d[1],d[2],d[3], port);
|
||||
#endif
|
||||
|
||||
connAddr.addr = *((u32_t *)_ips[0].rawIpData());
|
||||
Connection *conn = getConnection(sock);
|
||||
DEBUG_INFO(" sock=%p, fd=%d, port=%d", (void*)&sock, bind_rpc->fd, port);
|
||||
DEBUG_ATTN(" sock=%p, fd=%d, port=%d", (void*)&sock, bind_rpc->fd, port);
|
||||
if(conn) {
|
||||
if(conn->type == SOCK_DGRAM) {
|
||||
#if defined(__ANDROID__)
|
||||
@@ -1096,7 +1104,7 @@ void NetconEthernetTap::handleBind(PhySocket *sock, PhySocket *rpcSock, void **u
|
||||
|
||||
void NetconEthernetTap::handleListen(PhySocket *sock, PhySocket *rpcSock, void **uptr, struct listen_st *listen_rpc)
|
||||
{
|
||||
DEBUG_INFO("sock=%p", (void*)&sock);
|
||||
DEBUG_ATTN("sock=%p", (void*)&sock);
|
||||
Mutex::Lock _l(_tcpconns_m);
|
||||
Connection *conn = getConnection(sock);
|
||||
|
||||
@@ -1138,10 +1146,10 @@ Connection * NetconEthernetTap::handleSocketProxy(PhySocket *sock, int socket_ty
|
||||
{
|
||||
Connection *conn = getConnection(sock);
|
||||
if(!conn){
|
||||
DEBUG_INFO("unable to locate Connection object for this PhySocket sock=%p", (void*)&sock);
|
||||
DEBUG_ERROR("unable to locate Connection object for this PhySocket sock=%p", (void*)&sock);
|
||||
return NULL;
|
||||
}
|
||||
DEBUG_INFO("sock=%p", (void*)&sock);
|
||||
DEBUG_ATTN("sock=%p", (void*)&sock);
|
||||
struct udp_pcb *new_udp_PCB = NULL;
|
||||
struct tcp_pcb *new_tcp_PCB = NULL;
|
||||
if(socket_type == SOCK_DGRAM) {
|
||||
@@ -1170,7 +1178,7 @@ Connection * NetconEthernetTap::handleSocketProxy(PhySocket *sock, int socket_ty
|
||||
|
||||
Connection * NetconEthernetTap::handleSocket(PhySocket *sock, void **uptr, struct socket_st* socket_rpc)
|
||||
{
|
||||
DEBUG_INFO("sock=%p", (void*)&sock);
|
||||
DEBUG_ATTN("sock=%p", (void*)&sock);
|
||||
struct udp_pcb *new_udp_PCB = NULL;
|
||||
struct tcp_pcb *new_tcp_PCB = NULL;
|
||||
if(socket_rpc->socket_type == SOCK_DGRAM) {
|
||||
@@ -1202,7 +1210,7 @@ Connection * NetconEthernetTap::handleSocket(PhySocket *sock, void **uptr, struc
|
||||
|
||||
int NetconEthernetTap::handleConnectProxy(PhySocket *sock, struct sockaddr_in *rawAddr)
|
||||
{
|
||||
DEBUG_INFO("sock=%p", (void*)&sock);
|
||||
DEBUG_ATTN("sock=%p", (void*)&sock);
|
||||
Mutex::Lock _l(_tcpconns_m);
|
||||
int port = rawAddr->sin_port;
|
||||
ip_addr_t connAddr = convert_ip(rawAddr);
|
||||
@@ -1298,7 +1306,7 @@ int NetconEthernetTap::handleConnectProxy(PhySocket *sock, struct sockaddr_in *r
|
||||
|
||||
void NetconEthernetTap::handleConnect(PhySocket *sock, PhySocket *rpcSock, Connection *conn, struct connect_st* connect_rpc)
|
||||
{
|
||||
DEBUG_EXTRA("sock=%p", (void*)&sock);
|
||||
DEBUG_ATTN("sock=%p", (void*)&sock);
|
||||
Mutex::Lock _l(_tcpconns_m);
|
||||
struct sockaddr_in *rawAddr = (struct sockaddr_in *) &connect_rpc->addr;
|
||||
int port = lwipstack->__lwip_ntohs(rawAddr->sin_port);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* LLC. Start here: http://www.zerotier.com/
|
||||
*/
|
||||
|
||||
#if defined(_SDK_INTERCEPT_)
|
||||
#if defined(SDK_INTERCEPT)
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
@@ -121,7 +121,7 @@ pthread_key_t thr_id_key;
|
||||
// Return whether 'intercept' API is enabled for this thread
|
||||
|
||||
bool check_intercept_enabled() {
|
||||
DEBUG_EXTRA("");
|
||||
// DEBUG_EXTRA("");
|
||||
if(!realconnect){
|
||||
load_symbols();
|
||||
}
|
||||
@@ -265,7 +265,7 @@ pthread_key_t thr_id_key;
|
||||
|
||||
int socket(SOCKET_SIG)
|
||||
{
|
||||
DEBUG_INFO();
|
||||
DEBUG_ATTN();
|
||||
if (!check_intercept_enabled() && socket_type) {
|
||||
int err = realsocket(socket_family, socket_type, protocol);
|
||||
if(err < 0) {
|
||||
@@ -296,7 +296,7 @@ pthread_key_t thr_id_key;
|
||||
|
||||
int connect(CONNECT_SIG)
|
||||
{
|
||||
DEBUG_INFO("fd=%d", fd);
|
||||
DEBUG_ATTN("fd=%d", fd);
|
||||
struct sockaddr_in *connaddr;
|
||||
connaddr = (struct sockaddr_in *)addr;
|
||||
if(addr->sa_family == AF_LOCAL || addr->sa_family == AF_UNIX) {
|
||||
@@ -359,7 +359,7 @@ pthread_key_t thr_id_key;
|
||||
|
||||
int bind(BIND_SIG)
|
||||
{
|
||||
DEBUG_INFO("fd=%d", fd);
|
||||
DEBUG_ATTN("fd=%d", fd);
|
||||
// make sure we don't touch any standard outputs
|
||||
if(fd == 0 || fd == 1 || fd == 2)
|
||||
return(realbind(fd, addr, addrlen));
|
||||
@@ -417,7 +417,7 @@ pthread_key_t thr_id_key;
|
||||
|
||||
#if defined(__linux__)
|
||||
int accept4(ACCEPT4_SIG) {
|
||||
DEBUG_INFO("fd=%d", fd);
|
||||
DEBUG_ATTN("fd=%d", fd);
|
||||
return zts_accept4(fd, addr, addrlen, flags);
|
||||
}
|
||||
#endif
|
||||
@@ -428,7 +428,7 @@ pthread_key_t thr_id_key;
|
||||
// int fd struct sockaddr *addr, socklen_t *addrlen
|
||||
|
||||
int accept(ACCEPT_SIG) {
|
||||
DEBUG_INFO("fd=%d", fd);
|
||||
DEBUG_ATTN("fd=%d", fd);
|
||||
if (!check_intercept_enabled())
|
||||
return realaccept(fd, addr, addrlen);
|
||||
|
||||
@@ -483,7 +483,7 @@ pthread_key_t thr_id_key;
|
||||
|
||||
int listen(LISTEN_SIG)
|
||||
{
|
||||
DEBUG_INFO("fd=%d", fd);
|
||||
DEBUG_ATTN("fd=%d", fd);
|
||||
if (!check_intercept_enabled())
|
||||
return reallisten(fd, backlog);
|
||||
|
||||
|
||||
@@ -52,7 +52,11 @@ struct tcp_pcb;
|
||||
#define LWIP_HTONS_SIG u16_t x
|
||||
#define LWIP_NTOHS_SIG u16_t x
|
||||
#define IPADDR_NTOA_SIG const ip_addr_t *addr
|
||||
#define ETHARP_OUTPUT_SIG struct netif *netif, struct pbuf *q, const ip_addr_t *ipaddr
|
||||
#if defined(LWIP_VERSION_2)
|
||||
#define ETHARP_OUTPUT_SIG struct netif *netif, struct pbuf *q, const ip_addr_t *ipaddr
|
||||
#elif defined (LWIP_VERSION_1)
|
||||
#define ETHARP_OUTPUT_SIG struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr
|
||||
#endif
|
||||
#define ETHERNET_INPUT_SIG struct pbuf *p, struct netif *netif
|
||||
#define IP_INPUT_SIG struct pbuf *p, struct netif *inp
|
||||
#define NETIF_SET_DEFAULT_SIG struct netif *netif
|
||||
|
||||
@@ -115,7 +115,7 @@ int (*realclose)(CLOSE_SIG);
|
||||
DEBUG_INFO("$ZT_NC_NETWORK(len=%d)=%s", strlen(api_netpath), api_netpath);
|
||||
}
|
||||
#endif
|
||||
DEBUG_EXTRA("api_netpath=%s", api_netpath);
|
||||
//DEBUG_EXTRA("api_netpath=%s", api_netpath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user