[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.19
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
src
/
file_protector-1.1-1589
/
transport
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 device.c
1,233 B
SET
[ EDIT ]
|
[ DEL ]
📄 device.h
257 B
SET
[ EDIT ]
|
[ DEL ]
📄 exec_event.c
7,518 B
SET
[ EDIT ]
|
[ DEL ]
📄 exec_event.h
391 B
SET
[ EDIT ]
|
[ DEL ]
📄 exit_event.c
1,535 B
SET
[ EDIT ]
|
[ DEL ]
📄 exit_event.h
291 B
SET
[ EDIT ]
|
[ DEL ]
📄 fork_event.c
9,026 B
SET
[ EDIT ]
|
[ DEL ]
📄 fork_event.h
360 B
SET
[ EDIT ]
|
[ DEL ]
📄 fs_event.c
37,830 B
SET
[ EDIT ]
|
[ DEL ]
📄 fs_event.h
3,674 B
SET
[ EDIT ]
|
[ DEL ]
📄 message.c
22,398 B
SET
[ EDIT ]
|
[ DEL ]
📄 message.h
4,170 B
SET
[ EDIT ]
|
[ DEL ]
📄 ring.h
2,347 B
SET
[ EDIT ]
|
[ DEL ]
📄 set.h
1,911 B
SET
[ EDIT ]
|
[ DEL ]
📄 subtype.h
4,354 B
SET
[ EDIT ]
|
[ DEL ]
📄 thread_safe_path.h
2,330 B
SET
[ EDIT ]
|
[ DEL ]
📄 transport.c
77,315 B
SET
[ EDIT ]
|
[ DEL ]
📄 transport.h
5,314 B
SET
[ EDIT ]
|
[ DEL ]
📄 transport_id.h
1,789 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: transport_id.h
/** @file transport_id.h @brief Id of the transport @details Copyright (c) 2024 Acronis International GmbH @author Denis Kopyrin (denis.kopyrin@acronis.com) @since $Id: $ */ #pragma once #include <linux/types.h> // bool, [u]int(8|16|32|64)_t, pid_t #ifdef KERNEL_MOCK #include <mock/mock.h> #endif // Limits max size of 'transport_index' #define MAX_TRANSPORT_SIZE 4 // Memory layout of transport id is // struct { // uint64_t seq_num : 55; // uint64_t taken: 1; // uint64_t index : 8; // } id; // The reason why I am not using it is because I want to be able to compare transport ids between each other. // Larger transport id is expected to arrive after smaller transport id so it takes precedence. // transport_id == 0 is reserved for invalid/empty transport id and can never be used typedef uint64_t transport_id_t; #define TRANSPORT_ID_TAKEN_BIT (1 << 8) #define TRANSPORT_ID_INDEX_MASK 0xFF #define TRANSPORT_ID_SEQ_NUM_SHIFT (8 + 1) static inline uint64_t transport_id_taken(transport_id_t id) { return id & TRANSPORT_ID_TAKEN_BIT; } static inline uint64_t transport_id_seq_num(transport_id_t id) { return id >> TRANSPORT_ID_SEQ_NUM_SHIFT; } static inline int transport_id_index(transport_id_t id) { return id & TRANSPORT_ID_INDEX_MASK; } static inline transport_id_t transport_id_make(uint64_t seq_num, int index) { return (seq_num << TRANSPORT_ID_SEQ_NUM_SHIFT) | TRANSPORT_ID_TAKEN_BIT | index; } // This is useful to keep the index correct but not mark transport as taken // Any id with 'transport_id_make' will be larger than id made by 'transport_id_make_not_taken' static inline transport_id_t transport_id_make_not_taken(unsigned index) { return index; } typedef union { transport_id_t ids[MAX_TRANSPORT_SIZE]; } transport_ids_t;