diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-08-18 03:29:12 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-08-24 22:51:00 +0200 |
commit | dbb2f11a32cdde060798c14cdac33f95e22f39bb (patch) | |
tree | dd8ba40445effe4451769a957213e4f8a158a913 /ncr-sessions.c | |
parent | f1382e005ed777e286c4c88fd8320ba133f8c0c6 (diff) | |
download | cryptodev-linux-dbb2f11a32cdde060798c14cdac33f95e22f39bb.tar.gz cryptodev-linux-dbb2f11a32cdde060798c14cdac33f95e22f39bb.tar.xz cryptodev-linux-dbb2f11a32cdde060798c14cdac33f95e22f39bb.zip |
Simplify algorithm lookup by nla
Diffstat (limited to 'ncr-sessions.c')
-rw-r--r-- | ncr-sessions.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ncr-sessions.c b/ncr-sessions.c index 711963b..320a061 100644 --- a/ncr-sessions.c +++ b/ncr-sessions.c @@ -29,6 +29,7 @@ #include "ncr-int.h" #include <linux/mm_types.h> #include <linux/scatterlist.h> +#include <net/netlink.h> static int _ncr_session_update_key(struct ncr_lists* lists, struct ncr_session_op_st* op); static void _ncr_session_remove(struct ncr_lists *lst, ncr_session_t desc); @@ -214,6 +215,13 @@ const struct algo_properties_st *_ncr_algo_to_properties(ncr_algorithm_t algo) return NULL; } +const struct algo_properties_st *_ncr_nla_to_properties(const struct nlattr *nla) +{ + if (nla == NULL) + return NULL; + return _ncr_algo_to_properties(nla_get_u32(nla)); +} + static int _ncr_session_init(struct ncr_lists* lists, struct ncr_session_st* session) { struct session_item_st* ns = NULL; |