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.
NetworkStack_stub.cpp
00001 /* 00002 * Copyright (c) 2017, 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 "NetworkStack.h" 00019 #include "nsapi_dns.h" 00020 #include "mbed.h" 00021 #include "stddef.h" 00022 #include <new> 00023 00024 // Default NetworkStack operations 00025 nsapi_error_t NetworkStack::gethostbyname(const char *name, SocketAddress *address, nsapi_version_t version) 00026 { 00027 return NSAPI_ERROR_OK ; 00028 } 00029 00030 nsapi_error_t NetworkStack::add_dns_server(const SocketAddress &address) 00031 { 00032 return NSAPI_ERROR_OK ; 00033 } 00034 00035 nsapi_error_t NetworkStack::get_dns_server(int index, SocketAddress *address) 00036 { 00037 return NSAPI_ERROR_UNSUPPORTED ; 00038 } 00039 00040 nsapi_error_t NetworkStack::setstackopt(int level, int optname, const void *optval, unsigned optlen) 00041 { 00042 return NSAPI_ERROR_UNSUPPORTED ; 00043 } 00044 00045 nsapi_error_t NetworkStack::getstackopt(int level, int optname, void *optval, unsigned *optlen) 00046 { 00047 return NSAPI_ERROR_UNSUPPORTED ; 00048 } 00049 00050 nsapi_error_t NetworkStack::setsockopt(void *handle, int level, int optname, const void *optval, unsigned optlen) 00051 { 00052 return NSAPI_ERROR_UNSUPPORTED ; 00053 } 00054 00055 nsapi_error_t NetworkStack::getsockopt(void *handle, int level, int optname, void *optval, unsigned *optlen) 00056 { 00057 return NSAPI_ERROR_UNSUPPORTED ; 00058 } 00059 00060 // Conversion function for network stacks 00061 NetworkStack *nsapi_create_stack(nsapi_stack_t *stack) 00062 { 00063 return NULL; 00064 } 00065 00066 NetworkStack *nsapi_create_stack(NetworkStack *stack) 00067 { 00068 return NULL; 00069 } 00070 00071 nsapi_value_or_error_t NetworkStack::gethostbyname_async(const char *host, hostbyname_cb_t callback, 00072 nsapi_version_t version) 00073 { 00074 return NSAPI_ERROR_UNSUPPORTED ; 00075 } 00076 00077 nsapi_error_t NetworkStack::gethostbyname_async_cancel(int id) 00078 { 00079 return NSAPI_ERROR_UNSUPPORTED ; 00080 } 00081 00082 call_in_callback_cb_t NetworkStack::get_call_in_callback() 00083 { 00084 return NULL; 00085 } 00086 00087 nsapi_error_t NetworkStack::call_in(int delay, mbed::Callback<void()> func) 00088 { 00089 return NSAPI_ERROR_UNSUPPORTED ; 00090 } 00091 00092 const char *NetworkStack::get_ip_address() 00093 { 00094 return NULL; 00095 }
Generated on Tue Aug 9 2022 00:37:16 by
1.7.2