#ifndef CT_USERMGMT_H #define CT_USERMGMT_H #include #include "curve.h" #include "crypto_hash_sha512.h" enum is_user_enum { USERNAMES_OK = 0, /* Usernames match, valid 'token' */ USERNAMES_NE, /* Usernames do not match */ USERNAMES_TS, /* Usernames match, but 'token' invalid, Drop connection here */ USERNAMES_ERR, }; struct username_struct { uint32_t salt; uint8_t hash[crypto_hash_sha512_BYTES]; }; extern int username_msg(char *username, size_t len, char *dst, size_t dlen); extern enum is_user_enum username_msg_is_user(char *src, size_t slen, char *username, size_t len); extern void parse_userfile_and_generate_user_store_or_die(char *homedir); extern void dump_user_store(void); extern void destroy_user_store(void); extern int get_user_by_socket(int sock, struct curve25519_proto **proto); extern int get_user_by_sockaddr(struct sockaddr_storage *sa, size_t sa_len, struct curve25519_proto **proto); extern int try_register_user_by_socket(struct curve25519_struct *c, char *src, size_t slen, int sock, int log); extern int try_register_user_by_sockaddr(struct curve25519_struct *c, char *src, size_t slen, struct sockaddr_storage *sa, size_t sa_len, int log); extern void remove_user_by_socket(int sock); extern void remove_user_by_sockaddr(struct sockaddr_storage *sa, size_t sa_len); #endif /* CT_USERMGMT_H */ td> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2017-01-10 16:58:06 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-10 18:31:55 -0800
commit8c2dd3e4a4bae78093c4a5cee6494877651be3c9 (patch)
treed615ea6a6e65bbe9fba82d7c944ad3e762bd1f8d
parentb4536f0c829c8586544c94735c343f9b5070bd01 (diff)
mm: rename __alloc_page_frag to page_frag_alloc and __free_page_frag to page_frag_free
Patch series "Page fragment updates", v4. This patch series takes care of a few cleanups for the page fragments API. First we do some renames so that things are much more consistent. First we move the page_frag_ portion of the name to the front of the functions names. Secondly we split out the cache specific functions from the other page fragment functions by adding the word "cache" to the name. Finally I added a bit of documentation that will hopefully help to explain some of this. I plan to revisit this later as we get things more ironed out in the near future with the changes planned for the DMA setup to support eXpress Data Path. This patch (of 3): This patch renames the page frag functions to be more consistent with other APIs. Specifically we place the name page_frag first in the name and then have either an alloc or free call name that we append as the suffix. This makes it a bit clearer in terms of naming. In addition we drop the leading double underscores since we are technically no longer a backing interface and instead the front end that is called from the networking APIs. Link: http://lkml.kernel.org/r/20170104023854.13451.67390.stgit@localhost.localdomain Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>