File: getroute.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 (30 lines) | stat: -rw-r--r-- 893 bytes parent folder | download | duplicates (2)
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
/* $Id: getroute.h,v 1.4 2025/04/03 21:11:35 nanard Exp $ */
/* MiniUPnP project
 * http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
 * (c) 2006-2025 Thomas Bernard
 * This software is subject to the conditions detailed
 * in the LICENCE file provided within the distribution */

#ifndef  GETROUTE_H_INCLUDED
#define  GETROUTE_H_INCLUDED

/*! \file getroute.h
 * \brief access system network routes
 *
 * Must be implemented for each supported system (BSD/Linux/etc.)
 */

/*! \brief get interface for route to
 *
 * \param[in] dst destination of the route
 * \param[out] src pointer to a struct in_addr or in6_addr
 * \param[in] src_len src buffer length
 * \param[out] index interface index
 * \return 0 on success, -1 on error
 */
int
get_src_for_route_to(const struct sockaddr * dst,
                     void * src, size_t * src_len,
                     int * index);

#endif