CNDP 22.08.0
Loading...
Searching...
No Matches
uid_private.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2019-2022 Intel Corporation
3 */
4
5#ifndef _UID_PRIVATE_H_
6#define _UID_PRIVATE_H_
7
14#include <sys/queue.h>
15#include <bsd/sys/bitstring.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define UID_MAGIC_ID 0x20180403
22
23typedef struct uid_entry {
24 STAILQ_ENTRY(uid_entry) next;
25 char name[CNE_NAME_LEN];
26 uint16_t allocated;
27 uint16_t max_ids;
28 int32_t bitmap_sz;
29 bitstr_t *bitmap;
30 pthread_mutex_t mutex;
31} uid_entry_t;
32
33typedef struct uid_s {
34 uint32_t magic_id;
35 uint32_t list_cnt;
36 STAILQ_HEAD(, uid_entry) list;
37} uid_private_t;
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif /* _UID_PRIVATE_H_ */