Core networking libraries including LwIP implementation
Dependencies: DebugLib lwip_ppp_ethernet
Dependents: EthernetNetworkLib
main/if/LwIPInterface.h@4:e60b65fed967, 2012-05-31 (annotated)
- Committer:
- donatien
- Date:
- Thu May 31 15:09:06 2012 +0000
- Revision:
- 4:e60b65fed967
- Parent:
- 1:240e3322b87a
Debuglib up
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
donatien | 1:240e3322b87a | 1 | /* LwIPInterface.h */ |
donatien | 1:240e3322b87a | 2 | /* |
donatien | 1:240e3322b87a | 3 | Copyright (C) 2012 ARM Limited. |
donatien | 1:240e3322b87a | 4 | |
donatien | 1:240e3322b87a | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of |
donatien | 1:240e3322b87a | 6 | this software and associated documentation files (the "Software"), to deal in |
donatien | 1:240e3322b87a | 7 | the Software without restriction, including without limitation the rights to |
donatien | 1:240e3322b87a | 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies |
donatien | 1:240e3322b87a | 9 | of the Software, and to permit persons to whom the Software is furnished to do |
donatien | 1:240e3322b87a | 10 | so, subject to the following conditions: |
donatien | 1:240e3322b87a | 11 | |
donatien | 1:240e3322b87a | 12 | The above copyright notice and this permission notice shall be included in all |
donatien | 1:240e3322b87a | 13 | copies or substantial portions of the Software. |
donatien | 1:240e3322b87a | 14 | |
donatien | 1:240e3322b87a | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
donatien | 1:240e3322b87a | 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
donatien | 1:240e3322b87a | 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
donatien | 1:240e3322b87a | 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
donatien | 1:240e3322b87a | 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
donatien | 1:240e3322b87a | 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
donatien | 1:240e3322b87a | 21 | SOFTWARE. |
donatien | 1:240e3322b87a | 22 | */ |
donatien | 1:240e3322b87a | 23 | |
donatien | 1:240e3322b87a | 24 | #ifndef LWIPINTERFACE_H_ |
donatien | 1:240e3322b87a | 25 | #define LWIPINTERFACE_H_ |
donatien | 1:240e3322b87a | 26 | |
donatien | 1:240e3322b87a | 27 | #include "core/fwk.h" |
donatien | 1:240e3322b87a | 28 | #include "IPInterface.h" |
donatien | 1:240e3322b87a | 29 | |
donatien | 1:240e3322b87a | 30 | #include "rtos.h" |
donatien | 1:240e3322b87a | 31 | |
donatien | 1:240e3322b87a | 32 | /** LwIP-based network interface |
donatien | 1:240e3322b87a | 33 | * |
donatien | 1:240e3322b87a | 34 | */ |
donatien | 1:240e3322b87a | 35 | class LwIPInterface : public IPInterface |
donatien | 1:240e3322b87a | 36 | { |
donatien | 1:240e3322b87a | 37 | public: |
donatien | 1:240e3322b87a | 38 | LwIPInterface(); |
donatien | 1:240e3322b87a | 39 | virtual ~LwIPInterface(); |
donatien | 1:240e3322b87a | 40 | |
donatien | 1:240e3322b87a | 41 | virtual int init(); //Init LwIP-specific stuff, create the right bindings, etc |
donatien | 1:240e3322b87a | 42 | virtual int connect() = 0; |
donatien | 1:240e3322b87a | 43 | virtual int disconnect() = 0; |
donatien | 1:240e3322b87a | 44 | |
donatien | 1:240e3322b87a | 45 | private: |
donatien | 1:240e3322b87a | 46 | static void tcpipRdyCb(void* ctx); //Result of TCP/IP thread launch |
donatien | 1:240e3322b87a | 47 | Semaphore m_rdySphre; |
donatien | 1:240e3322b87a | 48 | }; |
donatien | 1:240e3322b87a | 49 | |
donatien | 1:240e3322b87a | 50 | #endif /* LWIPINTERFACE_H_ */ |