/usr/include/paristraceroute/socketpool.h is in libparistraceroute-dev 0.93+git20160927-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | #include "use.h"
#ifndef SOCKETPOOL_H
#define SOCKETPOOl_H
#include "packet.h"
typedef struct {
#ifdef USE_IPV4
int ipv4_sockfd; /**< File descriptor of the IPv4 raw socket */
#endif
#ifdef USE_IPV6
int ipv6_sockfd; /**< File descriptor of the IPv6 raw socket */
#endif
} socketpool_t;
/**
* \brief Allocate a socketpool_t instance
* \return The address of the newly allocated socketpool_t instance,
* NULL in case of failure.
*/
socketpool_t * socketpool_create(void);
/**
* \brief Release a socket pool from the memory.
* \param socketpool Address of the socketpool we want to release
* from the memory.
*/
void socketpool_free(socketpool_t * socketpool);
/**
* \brief Sends a packet on the network using a socket from the pool
* \param socketpool The socketpool to use
* \param packet The packet to send
* \return true iif successful
*/
bool socketpool_send_packet(const socketpool_t * socketpool, const packet_t * packet);
#endif
|