Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: EthernetInterface_vz
Fork of lwip by
Revision 30:cb9095482c25, committed 2015-04-07
- Comitter:
- klauss
- Date:
- Tue Apr 07 14:27:01 2015 +0000
- Parent:
- 29:da6f39d13880
- Commit message:
- wip
Changed in this revision
| api/sockets.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/api/sockets.c Thu Jan 08 23:42:30 2015 +0000
+++ b/api/sockets.c Tue Apr 07 14:27:01 2015 +0000
@@ -60,6 +60,9 @@
#define NUM_SOCKETS MEMP_NUM_NETCONN
+extern int lwip_sock_portando_ntohs;
+extern int lwip_sock_portando_local_port;
+
/** Contains all internal pointers and states used for a socket */
struct lwip_sock {
/** sockets currently are built on netconns, each socket has one netconn */
@@ -420,11 +423,15 @@
inet_addr_to_ipaddr(&local_addr, &name_in->sin_addr);
local_port = name_in->sin_port;
+ lwip_sock_portando_local_port = local_port
+
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d, addr=", s));
ip_addr_debug_print(SOCKETS_DEBUG, &local_addr);
LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F")\n", ntohs(local_port)));
err = netconn_bind(sock->conn, &local_addr, ntohs(local_port));
+
+ lwip_sock_portando_ntohs = ntohs(local_port);
if (err != ERR_OK) {
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d) failed, err=%d\n", s, err));
