ArvernOS
|
Data Structures | |
struct | descriptor_t |
Functions | |
int | create_file_descriptor (inode_t inode, uint32_t flags) |
int | create_socket_descriptor (inode_t inode, uint32_t domain, uint32_t type, uint32_t protocol) |
descriptor_t * | get_descriptor (int id) |
void | delete_descriptor (int id) |
int | descriptor_udp_lookup (uint16_t port) |
bool | is_protocol_supported (uint32_t type, uint32_t protocol) |
int create_file_descriptor | ( | inode_t | inode, |
uint32_t | flags ) |
Creates a file descriptor.
inode | the inode for the file descriptor to create |
flags | some descriptor flags |
int create_socket_descriptor | ( | inode_t | inode, |
uint32_t | domain, | ||
uint32_t | type, | ||
uint32_t | protocol ) |
Creates a socket descriptor.
inode | the inode for the socket descriptor to create |
domain | the domain of the socket |
type | the type of the socket |
protocol | the protocol of the socket |
void delete_descriptor | ( | int | id | ) |
Deletes a descriptor.
id | the descriptor ID |
int descriptor_udp_lookup | ( | uint16_t | port | ) |
Returns a socket descriptor for UDP.
port | the port bound to the socket to return |
descriptor_t * get_descriptor | ( | int | id | ) |
Returns a descriptor.
id | the descriptor ID |
NULL
bool is_protocol_supported | ( | uint32_t | type, |
uint32_t | protocol ) |
Returns whether a socket protocol is supported.
TODO: move this function somewhere else.
type | socket type |
protocol | socket protocol |
true
when the protocol is supported, false
otherwise