| 1 |
/* |
| 2 |
* Copyright (C) 2019 Red Hat, Inc. |
| 3 |
* SPDX-License-Identifier: LGPL-2.1-or-later |
| 4 |
*/ |
| 5 |
|
| 6 |
#pragma once |
| 7 |
|
| 8 |
#include <stdbool.h> |
| 9 |
#include <stddef.h> |
| 10 |
#include <stdint.h> |
| 11 |
#include <sys/types.h> |
| 12 |
#include <time.h> |
| 13 |
|
| 14 |
bool |
| 15 |
get_remaining_timeout (struct timespec *start, |
| 16 |
uint64_t *timeout_remaining, |
| 17 |
uint64_t timeout_us); |
| 18 |
|
| 19 |
bool |
| 20 |
recv_alnum (int fd, |
| 21 |
char *buffer, |
| 22 |
size_t size, |
| 23 |
int timeout); |
| 24 |
|
| 25 |
bool |
| 26 |
send_all (int fd, |
| 27 |
const char *buffer, |
| 28 |
size_t size, |
| 29 |
int timeout); |
| 30 |
|
| 31 |
int |
| 32 |
af_unix_connectat (int sockfd, |
| 33 |
int dirfd, |
| 34 |
const char *pathname); |
| 35 |
|
| 36 |
int |
| 37 |
af_unix_bindat (int sockfd, |
| 38 |
int dirfd, |
| 39 |
const char *pathname); |