File: getconnstatus.h

package info (click to toggle)
miniupnpd 2.3.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,040 kB
  • sloc: ansic: 28,571; sh: 2,024; makefile: 164
file content (44 lines) | stat: -rw-r--r-- 1,325 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* $Id: getconnstatus.h,v 1.6 2025/04/06 22:29:00 nanard Exp $ */
/* MiniUPnP project
 * http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
 * (c) 2011-2025 Thomas Bernard
 * This software is subject to the conditions detailed
 * in the LICENCE file provided within the distribution */

#ifndef GETCONNSTATUS_H_INCLUDED
#define GETCONNSTATUS_H_INCLUDED

/*! \file getconnstatus.h
 */

/*! \brief Unconfigured */
#define STATUS_UNCONFIGURED (0)
/*! \brief Connecting */
#define STATUS_CONNECTING (1)
/*! \brief Connected */
#define STATUS_CONNECTED (2)
/*! \brief PendingDisconnect */
#define STATUS_PENDINGDISCONNECT (3)
/*! \brief Disconnecting */
#define STATUS_DISCONNECTING (4)
/*! \brief Disconnected */
#define STATUS_DISCONNECTED (5)

/** \brief get the connection status of a network interface
 *
 * \param[in] ifname network interface name
 * \return #STATUS_UNCONFIGURED, #STATUS_CONNECTING, #STATUS_CONNECTED,
 *         #STATUS_PENDINGDISCONNECT, #STATUS_DISCONNECTING, #STATUS_DISCONNECTED
 */
int
get_wan_connection_status(const char * ifname);

/** \brief get the connection status of a network interface
 *
 * return the same value as get_wan_connection_status()
 * as a C string
 * \param[in] ifname network interface name */
const char *
get_wan_connection_status_str(const char * ifname);

#endif