mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-06 18:41:30 +00:00
Converted netconn_type() from a function to a macro
This commit is contained in:
parent
620b3e6739
commit
27b28a9306
@ -119,19 +119,6 @@ netconn_delete(struct netconn *conn)
|
|||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the type of a netconn (as enum netconn_type).
|
|
||||||
*
|
|
||||||
* @param conn the netconn of which to get the type
|
|
||||||
* @return the netconn_type of conn
|
|
||||||
*/
|
|
||||||
enum netconn_type
|
|
||||||
netconn_type(struct netconn *conn)
|
|
||||||
{
|
|
||||||
LWIP_ERROR("netconn_type: invalid conn", (conn != NULL), return NETCONN_INVALID;);
|
|
||||||
return conn->type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the local or remote IP address and port of a netconn.
|
* Get the local or remote IP address and port of a netconn.
|
||||||
* For RAW netconns, this returns the protocol instead of a port!
|
* For RAW netconns, this returns the protocol instead of a port!
|
||||||
|
@ -168,7 +168,8 @@ struct
|
|||||||
netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto,
|
netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto,
|
||||||
netconn_callback callback);
|
netconn_callback callback);
|
||||||
err_t netconn_delete (struct netconn *conn);
|
err_t netconn_delete (struct netconn *conn);
|
||||||
enum netconn_type netconn_type (struct netconn *conn);
|
/** Get the type of a netconn (as enum netconn_type). */
|
||||||
|
#define netconn_type(conn) (conn->type)
|
||||||
|
|
||||||
err_t netconn_getaddr (struct netconn *conn,
|
err_t netconn_getaddr (struct netconn *conn,
|
||||||
struct ip_addr *addr,
|
struct ip_addr *addr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user