miniupnpc: Update to 2.2.8 (new major 18)

Keep support for major 17 by using a version check for the changed API.

Fixes #93907.

(cherry picked from commit 4c72d599f0)
This commit is contained in:
Rémi Verschelde
2024-09-18 11:50:54 +02:00
parent 3aafddd63b
commit cad4caa81b
10 changed files with 79 additions and 116 deletions

View File

@ -1,9 +1,9 @@
/* $Id: miniupnpc.h,v 1.63 2024/01/04 00:45:17 nanard Exp $ */
/* $Id: miniupnpc.h,v 1.66 2024/06/08 22:13:14 nanard Exp $ */
/* vim: tabstop=4 shiftwidth=4 noexpandtab
* Project: miniupnp
* http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
* Author: Thomas Bernard
* Copyright (c) 2005-2022 Thomas Bernard
* Copyright (c) 2005-2024 Thomas Bernard
* This software is subjects to the conditions detailed
* in the LICENCE file provided within this distribution */
#ifndef MINIUPNPC_H_INCLUDED
@ -20,8 +20,8 @@
#define UPNPDISCOVER_MEMORY_ERROR (-102)
/* versions : */
#define MINIUPNPC_VERSION "2.2.6"
#define MINIUPNPC_API_VERSION 17
#define MINIUPNPC_VERSION "2.2.8"
#define MINIUPNPC_API_VERSION 18
/* Source port:
Using "1" as an alias for 1900 for backwards compatibility
@ -108,9 +108,11 @@ struct UPNPUrls {
* return values :
* 0 = NO IGD found
* 1 = A valid connected IGD has been found
* 2 = A valid IGD has been found but it reported as
* 2 = A valid connected IGD has been found but its
* IP address is reserved (non routable)
* 3 = A valid IGD has been found but it reported as
* not connected
* 3 = an UPnP device has been found but was not recognized as an IGD
* 4 = an UPnP device has been found but was not recognized as an IGD
*
* In any non zero return case, the urls and data structures
* passed as parameters are set. Donc forget to call FreeUPNPUrls(urls) to
@ -119,8 +121,9 @@ struct UPNPUrls {
MINIUPNP_LIBSPEC int
UPNP_GetValidIGD(struct UPNPDev * devlist,
struct UPNPUrls * urls,
struct IGDdatas * data,
char * lanaddr, int lanaddrlen);
struct IGDdatas * data,
char * lanaddr, int lanaddrlen,
char * wanaddr, int wanaddrlen);
/* UPNP_GetIGDFromUrl()
* Used when skipping the discovery process.