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