Mistake on this page?
Report an issue in GitHub or email us
EthInterface.h
1 /*
2  * Copyright (c) 2015 ARM Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /* @file EthInterface.h Common interface between Ethernet hardware */
18 /** \addtogroup netinterface */
19 /** @{*/
20 
21 #ifndef ETH_INTERFACE_H
22 #define ETH_INTERFACE_H
23 
25 
26 
27 /** Common interface between Ethernet hardware.
28  */
29 class EthInterface : public virtual NetworkInterface {
30 public:
31 
32  /** @copydoc NetworkInterface::ethInterface
33  */
35  {
36  return this;
37  }
38 
39  /** Get the default Ethernet interface.
40  *
41  * This is provided as a weak method so applications can override it.
42  * Default behavior is to get the target's default interface, if
43  * any.
44  *
45  * @return Pointer to interface, if one exists.
46  */
48 
49 #if !defined(DOXYGEN_ONLY)
50 protected:
51 
52  /** Get the target's default Ethernet interface.
53  *
54  * This is provided as a weak method so targets can override it. The
55  * default implementation invokes EthernetInterface with the
56  * default EMAC and default network stack, if DEVICE_EMAC is set.
57  *
58  * @return Pointer to interface, if one exists.
59  */
60  static EthInterface *get_target_default_instance();
61 #endif //!defined(DOXYGEN_ONLY)
62 };
63 
64 
65 #endif
66 
67 /** @}*/
virtual EthInterface * ethInterface()
Return pointer to an EthInterface.
Definition: EthInterface.h:34
Network Interface base class.
static EthInterface * get_default_instance()
Get the default Ethernet interface.
Common interface that is shared between network devices.
Common interface between Ethernet hardware.
Definition: EthInterface.h:29
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.