Oliver Smith | 3a9f267 | 2019-11-20 10:56:35 +0100 | [diff] [blame] | 1 | /* Copyright 2019 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> |
| 2 | * |
| 3 | * All Rights Reserved |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along |
| 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #pragma once |
| 20 | |
| 21 | #include <stdint.h> |
| 22 | |
| 23 | struct osmo_mslookup_client; |
| 24 | struct osmo_mslookup_client_method; |
| 25 | |
| 26 | /*! MS Lookup mDNS server bind default IP. Taken from the Administratevly Scoped block, particularly the Organizational |
| 27 | * Scoped range, https://tools.ietf.org/html/rfc2365 . */ |
| 28 | #define OSMO_MSLOOKUP_MDNS_IP4 "239.192.23.42" |
| 29 | #define OSMO_MSLOOKUP_MDNS_IP6 "ff08::23:42" // <-- TODO: sane? |
| 30 | #define OSMO_MSLOOKUP_MDNS_PORT 4266 |
| 31 | |
| 32 | struct osmo_mslookup_client_method *osmo_mslookup_client_add_mdns(struct osmo_mslookup_client *client, const char *ip, |
| 33 | uint16_t port, int initial_packet_id, |
| 34 | const char *domain_suffix); |
| 35 | |
| 36 | const struct osmo_sockaddr_str *osmo_mslookup_client_method_mdns_get_bind_addr(struct osmo_mslookup_client_method *dns_method); |
| 37 | |
| 38 | const char *osmo_mslookup_client_method_mdns_get_domain_suffix(struct osmo_mslookup_client_method *dns_method); |