A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.
Dependents: oldheating gps motorhome heating
Diff: tcp/tcb.c
- Revision:
- 80:4ef1500fca1d
- Parent:
- 79:f50e02fb5c94
- Child:
- 83:08c983006a6e
--- a/tcp/tcb.c Sun Nov 11 15:44:23 2018 +0000 +++ b/tcp/tcb.c Thu Nov 15 16:55:29 2018 +0000 @@ -15,7 +15,7 @@ isn += 100000; //Gives each tcb 100,000 packets and won't repeat before 42,940 tcbs. return isn; } -struct tcb* TcbGetExisting(int ipType, int remArIndex, uint16_t port) +struct tcb* TcbGetExisting(int ipType, int remArIndex, int locIpScope, uint16_t remPort, uint16_t locPort) { for (int i = 0; i < TCB_COUNT; i++) { @@ -23,7 +23,9 @@ if (pTcb->state && pTcb->ipType == ipType && pTcb->remArIndex == remArIndex && - pTcb->remPort == port) return pTcb; + pTcb->locIpScope == locIpScope && + pTcb->remPort == remPort && + pTcb->locPort == locPort) return pTcb; } return NULL; }