Wrapper of NetworkSocketAPI for BSD sockets on POSIX systems

Dependents:   BSDInterfaceTests HelloBSDInterface

Committer:
geky
Date:
Sun Feb 28 02:00:46 2016 +0000
Revision:
0:d92b89886434
Child:
1:29c61c1420c8
Created stubs for BSDInterface

Who changed what in which revision?

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