sandbox / LWIPInterface

Dependencies:   lwip-eth lwip-sys lwip

Fork of LWIPInterface by Christopher Haster

Committer:
Christopher Haster
Date:
Thu Feb 25 11:09:49 2016 -0600
Revision:
2:7fb7e78cb17f
Parent:
1:2fbcfc9c12dd
Child:
3:774869068511
Added rudimentary implementation of the LWIPInterface

Who changed what in which revision?

UserRevisionLine numberNew contents of line
geky 1:2fbcfc9c12dd 1 /* LWIP implementation of NetworkInterfaceAPI
geky 1:2fbcfc9c12dd 2 * Copyright (c) 2015 ARM Limited
geky 1:2fbcfc9c12dd 3 *
geky 1:2fbcfc9c12dd 4 * Licensed under the Apache License, Version 2.0 (the "License");
geky 1:2fbcfc9c12dd 5 * you may not use this file except in compliance with the License.
geky 1:2fbcfc9c12dd 6 * You may obtain a copy of the License at
geky 1:2fbcfc9c12dd 7 *
geky 1:2fbcfc9c12dd 8 * http://www.apache.org/licenses/LICENSE-2.0
geky 1:2fbcfc9c12dd 9 *
geky 1:2fbcfc9c12dd 10 * Unless required by applicable law or agreed to in writing, software
geky 1:2fbcfc9c12dd 11 * distributed under the License is distributed on an "AS IS" BASIS,
geky 1:2fbcfc9c12dd 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
geky 1:2fbcfc9c12dd 13 * See the License for the specific language governing permissions and
geky 1:2fbcfc9c12dd 14 * limitations under the License.
geky 1:2fbcfc9c12dd 15 */
geky 1:2fbcfc9c12dd 16
geky 1:2fbcfc9c12dd 17 #ifndef LWIP_INTERFACE_H
geky 1:2fbcfc9c12dd 18 #define LWIP_INTERFACE_H
geky 1:2fbcfc9c12dd 19
geky 1:2fbcfc9c12dd 20 #include "EthernetInterface.h"
Christopher Haster 2:7fb7e78cb17f 21 #include "rtos.h"
Christopher Haster 2:7fb7e78cb17f 22 #include "lwip/netif.h"
geky 1:2fbcfc9c12dd 23
geky 1:2fbcfc9c12dd 24
geky 1:2fbcfc9c12dd 25 /** LWIPInterface class
geky 1:2fbcfc9c12dd 26 * Implementation of the NetworkInterface for LWIP
geky 1:2fbcfc9c12dd 27 */
geky 1:2fbcfc9c12dd 28 class LWIPInterface : public EthernetInterface
geky 1:2fbcfc9c12dd 29 {
geky 1:2fbcfc9c12dd 30 public:
geky 1:2fbcfc9c12dd 31 // Implementation of EthernetInterface
geky 1:2fbcfc9c12dd 32 virtual int32_t connect();
geky 1:2fbcfc9c12dd 33 virtual int32_t disconnect();
geky 1:2fbcfc9c12dd 34
geky 1:2fbcfc9c12dd 35 // Implementation of NetworkInterface
geky 1:2fbcfc9c12dd 36 virtual const char *getMACAddress();
geky 1:2fbcfc9c12dd 37
geky 1:2fbcfc9c12dd 38 virtual SocketInterface *createSocket(socket_protocol_t proto);
geky 1:2fbcfc9c12dd 39 virtual void destroySocket(SocketInterface *socket);
geky 1:2fbcfc9c12dd 40 };
geky 1:2fbcfc9c12dd 41
geky 1:2fbcfc9c12dd 42
geky 1:2fbcfc9c12dd 43 #endif