sandbox / NetworkSocketAPI

Dependencies:   DnsQuery

Fork of NetworkSocketAPI by Christopher Haster

Committer:
Kevin Bracey
Date:
Thu Apr 07 12:55:59 2016 +0100
Revision:
17:2fc20f6d377e
Add basic MeshInterface

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kevin Bracey 17:2fc20f6d377e 1 /* Socket
Kevin Bracey 17:2fc20f6d377e 2 * Copyright (c) 2015 ARM Limited
Kevin Bracey 17:2fc20f6d377e 3 *
Kevin Bracey 17:2fc20f6d377e 4 * Licensed under the Apache License, Version 2.0 (the "License");
Kevin Bracey 17:2fc20f6d377e 5 * you may not use this file except in compliance with the License.
Kevin Bracey 17:2fc20f6d377e 6 * You may obtain a copy of the License at
Kevin Bracey 17:2fc20f6d377e 7 *
Kevin Bracey 17:2fc20f6d377e 8 * http://www.apache.org/licenses/LICENSE-2.0
Kevin Bracey 17:2fc20f6d377e 9 *
Kevin Bracey 17:2fc20f6d377e 10 * Unless required by applicable law or agreed to in writing, software
Kevin Bracey 17:2fc20f6d377e 11 * distributed under the License is distributed on an "AS IS" BASIS,
Kevin Bracey 17:2fc20f6d377e 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Kevin Bracey 17:2fc20f6d377e 13 * See the License for the specific language governing permissions and
Kevin Bracey 17:2fc20f6d377e 14 * limitations under the License.
Kevin Bracey 17:2fc20f6d377e 15 */
Kevin Bracey 17:2fc20f6d377e 16
Kevin Bracey 17:2fc20f6d377e 17 #ifndef MESH_INTERFACE_H
Kevin Bracey 17:2fc20f6d377e 18 #define MESH_INTERFACE_H
Kevin Bracey 17:2fc20f6d377e 19
Kevin Bracey 17:2fc20f6d377e 20 #include "NetworkInterface.h"
Kevin Bracey 17:2fc20f6d377e 21
Kevin Bracey 17:2fc20f6d377e 22 /** MeshInterface class
Kevin Bracey 17:2fc20f6d377e 23 * Common interface that is shared between ethernet hardware
Kevin Bracey 17:2fc20f6d377e 24 */
Kevin Bracey 17:2fc20f6d377e 25 class MeshInterface : public NetworkInterface
Kevin Bracey 17:2fc20f6d377e 26 {
Kevin Bracey 17:2fc20f6d377e 27 public:
Kevin Bracey 17:2fc20f6d377e 28 /** Start the interface
Kevin Bracey 17:2fc20f6d377e 29 * @return 0 on success, negative on failure
Kevin Bracey 17:2fc20f6d377e 30 */
Kevin Bracey 17:2fc20f6d377e 31 virtual int connect() = 0;
Kevin Bracey 17:2fc20f6d377e 32
Kevin Bracey 17:2fc20f6d377e 33 /** Stop the interface
Kevin Bracey 17:2fc20f6d377e 34 * @return 0 on success, negative on failure
Kevin Bracey 17:2fc20f6d377e 35 */
Kevin Bracey 17:2fc20f6d377e 36 virtual int disconnect() = 0;
Kevin Bracey 17:2fc20f6d377e 37 };
Kevin Bracey 17:2fc20f6d377e 38
Kevin Bracey 17:2fc20f6d377e 39 #endif