Core networking libraries including LwIP implementation
Dependencies: DebugLib lwip_ppp_ethernet
Dependents: EthernetNetworkLib
IPInterface.cpp
00001 /* IPInterface.cpp */ 00002 /* 00003 Copyright (C) 2012 ARM Limited. 00004 00005 Permission is hereby granted, free of charge, to any person obtaining a copy of 00006 this software and associated documentation files (the "Software"), to deal in 00007 the Software without restriction, including without limitation the rights to 00008 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 00009 of the Software, and to permit persons to whom the Software is furnished to do 00010 so, subject to the following conditions: 00011 00012 The above copyright notice and this permission notice shall be included in all 00013 copies or substantial portions of the Software. 00014 00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00016 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00017 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00018 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00019 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00020 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00021 SOFTWARE. 00022 */ 00023 00024 #include "core/fwk.h" 00025 00026 #include "IPInterface.h" 00027 00028 00029 IPInterface::IPInterface() 00030 { 00031 00032 } 00033 00034 /*virtual*/ IPInterface::~IPInterface() 00035 { 00036 00037 } 00038 00039 void IPInterface::registerAsDefaultInterface() //First come, first served 00040 { 00041 s_pDefaultInterface = this; 00042 } 00043 00044 void IPInterface::unregisterAsDefaultInterface() //Must be called before inst is destroyed to avoid invalid ptr fault 00045 { 00046 s_pDefaultInterface = NULL; 00047 } 00048 00049 /*static*/ IPInterface* IPInterface::getDefaultInterface() //For use by TCP, UDP sockets library 00050 { 00051 return s_pDefaultInterface; 00052 } 00053 00054 /*static*/ IPInterface* IPInterface::s_pDefaultInterface = NULL;
Generated on Sun Jul 17 2022 01:35:55 by 1.7.2