Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of OmniWheels by
NetworkInterface_stub.cpp
00001 /* 00002 * Copyright (c) 2015, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 #include "netsocket/NetworkInterface.h" 00019 #include "netsocket/NetworkStack.h" 00020 #include <string.h> 00021 00022 00023 // Default network-interface state 00024 const char *NetworkInterface::get_mac_address() 00025 { 00026 return 0; 00027 } 00028 00029 const char *NetworkInterface::get_ip_address() 00030 { 00031 return 0; 00032 } 00033 00034 const char *NetworkInterface::get_netmask() 00035 { 00036 return 0; 00037 } 00038 00039 const char *NetworkInterface::get_gateway() 00040 { 00041 return 0; 00042 } 00043 00044 nsapi_error_t NetworkInterface::set_network(const char *ip_address, const char *netmask, const char *gateway) 00045 { 00046 return NSAPI_ERROR_UNSUPPORTED ; 00047 } 00048 00049 nsapi_error_t NetworkInterface::set_dhcp(bool dhcp) 00050 { 00051 return NSAPI_ERROR_UNSUPPORTED ; 00052 } 00053 00054 // DNS operations go through the underlying stack by default 00055 nsapi_error_t NetworkInterface::gethostbyname(const char *name, SocketAddress *address, nsapi_version_t version) 00056 { 00057 return NSAPI_ERROR_UNSUPPORTED ; 00058 } 00059 00060 nsapi_error_t NetworkInterface::add_dns_server(const SocketAddress &address) 00061 { 00062 return NSAPI_ERROR_UNSUPPORTED ; 00063 } 00064 00065 void NetworkInterface::attach(mbed::Callback<void(nsapi_event_t, intptr_t)> status_cb) 00066 { 00067 00068 } 00069 00070 nsapi_connection_status_t NetworkInterface::get_connection_status() const 00071 { 00072 return NSAPI_STATUS_LOCAL_UP ; 00073 } 00074 00075 nsapi_error_t NetworkInterface::set_blocking(bool blocking) 00076 { 00077 return NSAPI_ERROR_UNSUPPORTED ; 00078 } 00079
Generated on Fri Jul 22 2022 04:53:57 by
