Backport: relayd: use the fd-tracker to track stream_fd fds
[lttng-tools.git] / src / bin / lttng-relayd / stream-fd.h
CommitLineData
7591bab1
MD
1#ifndef _STREAM_FD_H
2#define _STREAM_FD_H
3
4/*
5 * Copyright (C) 2015 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
bdafebb5 6 * 2018 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
7591bab1
MD
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License, version 2 only, as
10 * published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * this program; if not, write to the Free Software Foundation, Inc., 51
19 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
bdafebb5 22#include <stdint.h>
7591bab1 23
bdafebb5 24struct stream_fd;
7591bab1 25
bdafebb5
JG
26struct stream_fd *stream_fd_open(const char *path);
27struct stream_fd *stream_fd_create(const char *path_name, const char *file_name,
28 uint64_t size, uint64_t count, const char *suffix);
29int stream_fd_rotate(struct stream_fd *sf, const char *path_name,
30 const char *file_name, uint64_t size,
31 uint64_t count, uint64_t *new_count);
7591bab1
MD
32void stream_fd_get(struct stream_fd *sf);
33void stream_fd_put(struct stream_fd *sf);
bdafebb5
JG
34int stream_fd_get_fd(struct stream_fd *sf);
35void stream_fd_put_fd(struct stream_fd *sf);
7591bab1
MD
36
37#endif /* _STREAM_FD_H */
This page took 0.0422940000000001 seconds and 5 git commands to generate.