3 * Copyright (c) 2020 Apple Computer, Inc. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * This file contains the SRP Advertising Proxy, which is an SRP Server
18 * that offers registered addresses using mDNS.
26 #include <sys/socket.h>
27 #include <netinet/in.h>
28 #include <arpa/inet.h>
37 #include "srp-crypto.h"
39 #include "dnssd-proxy.h"
41 #include "srp-proxy.h"
42 #include "srp-mdns-proxy.h"
43 #include "config-parse.h"
49 ERROR("ra-tester -t <thread interface name> --h <home interface name>");
54 main(int argc
, char **argv
)
57 extern char *thread_interface_name
;
58 extern char *home_interface_name
;
59 extern bool advertise_default_route_on_thread
;
61 for (i
= 1; i
< argc
; i
++) {
62 if (!strcmp(argv
[i
], "-t")) {
66 thread_interface_name
= argv
[i
+ 1];
68 } else if (!strcmp(argv
[i
], "-h")) {
72 home_interface_name
= argv
[i
+ 1];
79 if (thread_interface_name
== NULL
) {
80 INFO("thread interface name required.");
83 if (home_interface_name
== NULL
) {
84 INFO("home interface name required.");
93 if (!start_icmp_listener()) {
97 thread_network_startup();
102 INFO("dispatched %d events.", something
);
109 // c-file-style: "bsd"
112 // indent-tabs-mode: nil