commit d9883c7a14da067f2c7dd167d23be386c471da00
parent 629c789c60e5a1400da0f7f41ec3af6b49b056ef
Author: Michael Froman <mfroman@mozilla.com>
Date: Tue, 18 Nov 2025 17:44:37 +0000
Bug 2000353 - remove unused files transport_addr_reg.{c|h} r=bwc,ng
Differential Revision: https://phabricator.services.mozilla.com/D272744
Diffstat:
3 files changed, 0 insertions(+), 278 deletions(-)
diff --git a/dom/media/webrtc/transport/third_party/nICEr/nicer.gyp b/dom/media/webrtc/transport/third_party/nICEr/nicer.gyp
@@ -72,8 +72,6 @@
"./src/net/nr_socket_multi_tcp.h",
"./src/net/transport_addr.c",
"./src/net/transport_addr.h",
- "./src/net/transport_addr_reg.c",
- "./src/net/transport_addr_reg.h",
"./src/net/local_addr.c",
"./src/net/local_addr.h",
"./src/net/nr_interface_prioritizer.c",
diff --git a/dom/media/webrtc/transport/third_party/nICEr/src/net/transport_addr_reg.c b/dom/media/webrtc/transport/third_party/nICEr/src/net/transport_addr_reg.c
@@ -1,230 +0,0 @@
-/*
-Copyright (c) 2007, Adobe Systems, Incorporated
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-* Neither the name of Adobe Systems, Network Resonance nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <csi_platform.h>
-#include <stdio.h>
-#include <string.h>
-#include <memory.h>
-#include <sys/types.h>
-#ifdef WIN32
-#include <winsock2.h>
-#else
-#include <strings.h>
-#include <unistd.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#endif
-#include <assert.h>
-#include "nr_api.h"
-#include "util.h"
-#include "transport_addr.h"
-#include "transport_addr_reg.h"
-
-#ifndef INET6_ADDRSTRLEN
-#define INET6_ADDRSTRLEN 46 /* Value used by linux/BSD */
-#endif
-
-int
-nr_reg_get_transport_addr(NR_registry prefix, int keep, nr_transport_addr *addr)
-{
- int r,_status;
- unsigned int count;
- char *address = 0;
- UINT2 port = 0;
- char *ifname = 0;
- char *protocol = 0;
- int p;
-
- if ((r=NR_reg_get_child_count(prefix, &count)))
- ABORT(r);
-
- if (count == 0)
- ABORT(R_NOT_FOUND);
-
- if ((r=NR_reg_alloc2_string(prefix, "address", &address))) {
- if (r != R_NOT_FOUND)
- ABORT(r);
- address = 0;
- }
-
- if ((r=NR_reg_alloc2_string(prefix, "ifname", &ifname))) {
- if (r != R_NOT_FOUND)
- ABORT(r);
- ifname = 0;
- }
-
- if ((r=NR_reg_get2_uint2(prefix, "port", &port))) {
- if (r != R_NOT_FOUND)
- ABORT(r);
- port = 0;
- }
-
- if ((r=NR_reg_alloc2_string(prefix, "protocol", &protocol))) {
- if (r != R_NOT_FOUND)
- ABORT(r);
- p = IPPROTO_UDP;
-
- protocol = 0;
- }
- else {
- if (!strcasecmp("tcp", protocol))
- p = IPPROTO_TCP;
- else if (!strcasecmp("udp", protocol))
- p = IPPROTO_UDP;
- else
- ABORT(R_BAD_DATA);
- }
-
- if (!keep) memset(addr, 0, sizeof(*addr));
-
- if ((r=nr_str_port_to_transport_addr(address?address:"0.0.0.0", port, p, addr)))
- ABORT(r);
-
- if (ifname) {
- (void)strlcpy(addr->ifname, ifname, sizeof(addr->ifname));
- }
-
- _status=0;
- abort:
- RFREE(protocol);
- RFREE(ifname);
- RFREE(address);
- return(_status);
-}
-
-int
-nr_reg_set_transport_addr(NR_registry prefix, int keep, nr_transport_addr *addr)
-{
- int r,_status;
-
- if (! keep) {
- if ((r=NR_reg_del(prefix)))
- ABORT(r);
- }
-
- switch (addr->ip_version) {
- case NR_IPV4:
- if (!nr_transport_addr_is_wildcard(addr)) {
- if ((r=NR_reg_set2_string(prefix, "address", inet_ntoa(addr->u.addr4.sin_addr))))
- ABORT(r);
- }
-
- if (addr->u.addr4.sin_port != 0) {
- if ((r=NR_reg_set2_uint2(prefix, "port", ntohs(addr->u.addr4.sin_port))))
- ABORT(r);
- }
- break;
-
- case NR_IPV6:
- if (!nr_transport_addr_is_wildcard(addr)) {
- char address[INET6_ADDRSTRLEN];
- if(!inet_ntop(AF_INET6, &addr->u.addr6.sin6_addr,address,sizeof(address))) {
- ABORT(R_BAD_DATA);
- }
-
- if ((r=NR_reg_set2_string(prefix, "address", address))) {
- ABORT(r);
- }
- }
-
- if (addr->u.addr6.sin6_port != 0) {
- if ((r=NR_reg_set2_uint2(prefix, "port", ntohs(addr->u.addr6.sin6_port))))
- ABORT(r);
- }
- break;
- default:
- ABORT(R_INTERNAL);
- break;
- }
-
- /* We abort if neither NR_IPV4 or NR_IPV6 above */
- switch (addr->protocol) {
- case IPPROTO_TCP:
- if ((r=NR_reg_set2_string(prefix, "protocol", "tcp")))
- ABORT(r);
- break;
- case IPPROTO_UDP:
- if ((r=NR_reg_set2_string(prefix, "protocol", "udp")))
- ABORT(r);
- break;
- default:
- NR_UNIMPLEMENTED;
- break;
- }
-
- if (strlen(addr->ifname) > 0) {
- if ((r=NR_reg_set2_string(prefix, "ifname", addr->ifname)))
- ABORT(r);
- }
-
- _status=0;
- abort:
- if (_status)
- NR_reg_del(prefix);
- return _status;
-}
-
-int
-nr_reg_get_transport_addr2(NR_registry prefix, char *name, int keep, nr_transport_addr *addr)
-{
- int r, _status;
- NR_registry registry;
-
- if ((r=NR_reg_make_registry(prefix, name, registry)))
- ABORT(r);
-
- if ((r=nr_reg_get_transport_addr(registry, keep, addr)))
- ABORT(r);
-
- _status = 0;
-abort:
- return _status;
-}
-
-int
-nr_reg_set_transport_addr2(NR_registry prefix, char *name, int keep, nr_transport_addr *addr)
-{
- int r, _status;
- NR_registry registry;
-
- if ((r=NR_reg_make_registry(prefix, name, registry)))
- ABORT(r);
-
- if ((r=nr_reg_set_transport_addr(registry, keep, addr)))
- ABORT(r);
-
- _status = 0;
-abort:
- return _status;
-}
-
diff --git a/dom/media/webrtc/transport/third_party/nICEr/src/net/transport_addr_reg.h b/dom/media/webrtc/transport/third_party/nICEr/src/net/transport_addr_reg.h
@@ -1,46 +0,0 @@
-/*
-Copyright (c) 2007, Adobe Systems, Incorporated
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-* Neither the name of Adobe Systems, Network Resonance nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-
-#ifndef _transport_addr_reg_h
-#define _transport_addr_reg_h
-
-#include "registry.h"
-
-int nr_reg_get_transport_addr(NR_registry prefix, int keep, nr_transport_addr *addr);
-int nr_reg_set_transport_addr(NR_registry prefix, int keep, nr_transport_addr *addr);
-int nr_reg_get_transport_addr2(NR_registry prefix, char *name, int keep, nr_transport_addr *addr);
-int nr_reg_set_transport_addr2(NR_registry prefix, char *name, int keep, nr_transport_addr *addr);
-
-#endif
-