/* * crypto_lb.h * * Copyright (c) 2004 Evgeniy Polyakov * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __CRYPTO_LB_H #define __CRYPTO_LB_H #include "acrypto.h" #define CRYPTO_LB_NAMELEN 32 struct crypto_lb { struct list_head lb_entry; char name[CRYPTO_LB_NAMELEN]; void (*rehash)(struct crypto_lb *); struct crypto_device * (*find_device)(struct crypto_lb *, struct crypto_session_initializer *); spinlock_t lock; spinlock_t *crypto_device_lock; struct list_head *crypto_device_list; struct device_driver *driver; struct device device; struct class_device class_device; struct completion dev_released; }; int crypto_lb_register(struct crypto_lb *lb, int set_current, int set_default); void crypto_lb_unregister(struct crypto_lb *lb); inline void crypto_lb_rehash(void); struct crypto_device *crypto_lb_find_device(struct crypto_session_initializer *ci); int crypto_lb_init(void); void crypto_lb_fini(void); #endif /* __CRYPTO_LB_H */