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.
SocketAddress_stub.cpp
00001 /* 00002 * Copyright (c) , 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 "SocketAddress.h" 00019 #include "NetworkInterface.h" 00020 #include "NetworkStack.h" 00021 #include <string.h> 00022 #include "mbed.h" 00023 00024 00025 static bool ipv6_is_valid(const char *addr) 00026 { 00027 return false; 00028 } 00029 00030 static int ipv6_scan_chunk(uint16_t *shorts, const char *chunk) 00031 { 00032 return 0; 00033 } 00034 00035 00036 SocketAddress::SocketAddress(nsapi_addr_t addr, uint16_t port) 00037 { 00038 } 00039 00040 SocketAddress::SocketAddress(const char *addr, uint16_t port) 00041 { 00042 } 00043 00044 SocketAddress::SocketAddress(const void *bytes, nsapi_version_t version, uint16_t port) 00045 { 00046 } 00047 00048 SocketAddress::SocketAddress(const SocketAddress &addr) 00049 { 00050 } 00051 00052 SocketAddress::~SocketAddress() 00053 { 00054 } 00055 00056 bool SocketAddress::set_ip_address(const char *addr) 00057 { 00058 return false; 00059 } 00060 00061 void SocketAddress::set_ip_bytes(const void *bytes, nsapi_version_t version) 00062 { 00063 } 00064 00065 void SocketAddress::set_addr(nsapi_addr_t addr) 00066 { 00067 } 00068 00069 void SocketAddress::set_port(uint16_t port) 00070 { 00071 } 00072 00073 const char *SocketAddress::get_ip_address() const 00074 { 00075 return NULL; 00076 } 00077 00078 const void *SocketAddress::get_ip_bytes() const 00079 { 00080 return NULL; 00081 } 00082 00083 nsapi_version_t SocketAddress::get_ip_version() const 00084 { 00085 nsapi_version_t ver = NSAPI_IPv6 ; 00086 return ver; 00087 } 00088 00089 nsapi_addr_t SocketAddress::get_addr() const 00090 { 00091 nsapi_addr_t addr; 00092 addr.version = NSAPI_IPv6 ; 00093 return _addr; 00094 } 00095 00096 uint16_t SocketAddress::get_port() const 00097 { 00098 return 0; 00099 } 00100 00101 SocketAddress::operator bool() const 00102 { 00103 return false; 00104 } 00105 00106 SocketAddress &SocketAddress::operator=(const SocketAddress &addr) 00107 { 00108 set_addr(addr.get_addr()); 00109 set_port(addr.get_port()); 00110 return *this; 00111 } 00112 00113 bool operator==(const SocketAddress &a, const SocketAddress &b) 00114 { 00115 return false; 00116 } 00117 00118 bool operator!=(const SocketAddress &a, const SocketAddress &b) 00119 { 00120 return false; 00121 }
Generated on Tue Aug 9 2022 00:37:19 by
1.7.2