From 618355f5a725a47e9961e717d614266269ca2d04 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 17 Jan 2010 16:23:26 +0000 Subject: [PATCH] Minor: source code layout --- src/include/lwip/api.h | 48 +++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/src/include/lwip/api.h b/src/include/lwip/api.h index cdfcc2bd..14e79493 100644 --- a/src/include/lwip/api.h +++ b/src/include/lwip/api.h @@ -168,46 +168,36 @@ struct netconn { #define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c) struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, - netconn_callback callback); -err_t netconn_delete (struct netconn *conn); + netconn_callback callback); +err_t netconn_delete(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, - struct ip_addr *addr, - u16_t *port, - u8_t local); +err_t netconn_getaddr(struct netconn *conn, struct ip_addr *addr, + u16_t *port, u8_t local); #define netconn_peer(c,i,p) netconn_getaddr(c,i,p,0) #define netconn_addr(c,i,p) netconn_getaddr(c,i,p,1) -err_t netconn_bind (struct netconn *conn, - struct ip_addr *addr, - u16_t port); -err_t netconn_connect (struct netconn *conn, - struct ip_addr *addr, - u16_t port); -err_t netconn_disconnect (struct netconn *conn); -err_t netconn_listen_with_backlog(struct netconn *conn, u8_t backlog); +err_t netconn_bind(struct netconn *conn, struct ip_addr *addr, u16_t port); +err_t netconn_connect(struct netconn *conn, struct ip_addr *addr, u16_t port); +err_t netconn_disconnect (struct netconn *conn); +err_t netconn_listen_with_backlog(struct netconn *conn, u8_t backlog); #define netconn_listen(conn) netconn_listen_with_backlog(conn, TCP_DEFAULT_LISTEN_BACKLOG) -err_t netconn_accept (struct netconn *conn, struct netconn **new_conn); -err_t netconn_recv (struct netconn *conn, struct netbuf **buf); -err_t netconn_sendto (struct netconn *conn, - struct netbuf *buf, struct ip_addr *addr, u16_t port); -err_t netconn_send (struct netconn *conn, - struct netbuf *buf); -err_t netconn_write (struct netconn *conn, - const void *dataptr, size_t size, - u8_t apiflags); -err_t netconn_close (struct netconn *conn); +err_t netconn_accept(struct netconn *conn, struct netconn **new_conn); +err_t netconn_recv(struct netconn *conn, struct netbuf **new_buf); +err_t netconn_sendto(struct netconn *conn, struct netbuf *buf, + struct ip_addr *addr, u16_t port); +err_t netconn_send(struct netconn *conn, struct netbuf *buf); +err_t netconn_write(struct netconn *conn, const void *dataptr, size_t size, + u8_t apiflags); +err_t netconn_close(struct netconn *conn); #if LWIP_IGMP -err_t netconn_join_leave_group (struct netconn *conn, - struct ip_addr *multiaddr, - struct ip_addr *interface, - enum netconn_igmp join_or_leave); +err_t netconn_join_leave_group(struct netconn *conn, struct ip_addr *multiaddr, + struct ip_addr *interface, enum netconn_igmp join_or_leave); #endif /* LWIP_IGMP */ #if LWIP_DNS -err_t netconn_gethostbyname(const char *name, struct ip_addr *addr); +err_t netconn_gethostbyname(const char *name, struct ip_addr *addr); #endif /* LWIP_DNS */ #define netconn_err(conn) ((conn)->err)