]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/uid-range.h
resolved: TCP fast open connections
[thirdparty/systemd.git] / src / shared / uid-range.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
8530dc44
LP
2#pragma once
3
4/***
5 This file is part of systemd.
6
7 Copyright 2014 Lennart Poettering
8530dc44
LP
8***/
9
c1ff5570 10#include <stdbool.h>
8530dc44
LP
11#include <sys/types.h>
12
13typedef struct UidRange {
14 uid_t start, nr;
15} UidRange;
16
17int uid_range_add(UidRange **p, unsigned *n, uid_t start, uid_t nr);
18int uid_range_add_str(UidRange **p, unsigned *n, const char *s);
19
20int uid_range_next_lower(const UidRange *p, unsigned n, uid_t *uid);
21bool uid_range_contains(const UidRange *p, unsigned n, uid_t uid);