
Data Structures | |
| struct | vlc_acl_entry_t |
| struct | vlc_acl_t |
Typedefs | |
| typedef struct vlc_acl_entry_t | vlc_acl_entry_t |
Functions | |
| static int | ACL_Resolve (vlc_object_t *p_this, uint8_t *p_bytes, const char *psz_ip) |
| int | ACL_Check (vlc_acl_t *p_acl, const char *psz_ip) |
| Check if a given address passes an access control list. | |
| int | ACL_AddNet (vlc_acl_t *p_acl, const char *psz_ip, int i_len, bool b_allow) |
| Adds an item to an ACL. | |
| vlc_acl_t * | ACL_Create (vlc_object_t *p_this, bool b_allow) |
| Creates an empty ACL. | |
| vlc_acl_t * | ACL_Duplicate (vlc_object_t *p_this, const vlc_acl_t *p_acl) |
| Perform a deep copy of an existing ACL. | |
| void | ACL_Destroy (vlc_acl_t *p_acl) |
| Releases all resources associated with an ACL object. | |
| int | ACL_LoadFile (vlc_acl_t *p_acl, const char *psz_path) |
| Reads ACL entries from a file. | |
| typedef struct vlc_acl_entry_t vlc_acl_entry_t |
| int ACL_AddNet | ( | vlc_acl_t * | p_acl, | |
| const char * | psz_ip, | |||
| int | i_len, | |||
| bool | b_allow | |||
| ) |
Adds an item to an ACL.
Items are always matched in the same order as they are added.
References ACL_Resolve(), vlc_acl_entry_t::b_allow, vlc_acl_entry_t::host, vlc_acl_entry_t::i_bits_mask, vlc_acl_entry_t::i_bytes_match, vlc_acl_t::i_size, vlc_acl_t::p_entries, and vlc_acl_t::p_owner.
Referenced by ACL_LoadFile().
| int ACL_Check | ( | vlc_acl_t * | p_acl, | |
| const char * | psz_ip | |||
| ) |
Check if a given address passes an access control list.
| p_acl | pre-existing ACL to match the address against | |
| psz_ip | numeric IPv4/IPv6 address |
References ACL_Resolve(), vlc_acl_entry_t::b_allow, vlc_acl_t::b_allow_default, vlc_acl_entry_t::host, vlc_acl_entry_t::i_bits_mask, vlc_acl_entry_t::i_bytes_match, vlc_acl_t::i_size, vlc_acl_t::p_entries, and vlc_acl_t::p_owner.
Referenced by httpd_HostThread().
| vlc_acl_t* ACL_Create | ( | vlc_object_t * | p_this, | |
| bool | b_allow | |||
| ) |
Creates an empty ACL.
| b_allow | whether to grant (true) or deny (false) access by default (ie if none of the ACL entries matched). |
References vlc_acl_t::b_allow_default, vlc_acl_t::i_size, vlc_acl_t::p_entries, vlc_acl_t::p_owner, and vlc_object_hold.
| void ACL_Destroy | ( | vlc_acl_t * | p_acl | ) |
Releases all resources associated with an ACL object.
References vlc_acl_t::p_entries, vlc_acl_t::p_owner, and vlc_object_release.
Referenced by httpd_UrlDelete().
| vlc_acl_t* ACL_Duplicate | ( | vlc_object_t * | p_this, | |
| const vlc_acl_t * | p_acl | |||
| ) |
Perform a deep copy of an existing ACL.
| p_this | object to attach the copy to. | |
| p_acl | ACL object to be copied. |
References vlc_acl_t::b_allow_default, vlc_acl_t::i_size, vlc_acl_t::p_entries, vlc_acl_t::p_owner, and vlc_object_hold.
| int ACL_LoadFile | ( | vlc_acl_t * | p_acl, | |
| const char * | psz_path | |||
| ) |
Reads ACL entries from a file.
| p_acl | ACL object in which to insert parsed entries. | |
| psz_patch | filename from which to parse entries. |
References ACL_AddHost, ACL_AddNet(), msg_Dbg, msg_Err, msg_Warn, vlc_acl_t::p_owner, and vlc_fopen().
| static int ACL_Resolve | ( | vlc_object_t * | p_this, | |
| uint8_t * | p_bytes, | |||
| const char * | psz_ip | |||
| ) | [static] |
References freeaddrinfo(), msg_Err, and vlc_getaddrinfo().
Referenced by ACL_AddNet(), and ACL_Check().
1.7.1