Lines Matching defs:crypto_keys_args

188 		utun_crypto_keys_args_t *crypto_keys_args = (__typeof__(crypto_keys_args))data;
192 if (crypto_keys_args->ver == 0 || crypto_keys_args->ver >= UTUN_CRYPTO_KEYS_ARGS_VER_MAX) {
193 printf("%s: ver check failed %d\n", __FUNCTION__, crypto_keys_args->ver);
196 if (crypto_keys_args->dir == 0 || crypto_keys_args->dir >= UTUN_CRYPTO_DIR_MAX) {
197 printf("%s: dir check failed %d\n", __FUNCTION__, crypto_keys_args->dir);
200 if (crypto_keys_args->type == 0 || crypto_keys_args->type >= UTUN_CRYPTO_TYPE_MAX) {
201 printf("%s: type check failed %d\n", __FUNCTION__, crypto_keys_args->type);
204 if (len < UTUN_CRYPTO_KEYS_ARGS_TOTAL_SIZE(crypto_keys_args)) {
206 (int)len, (int)UTUN_CRYPTO_KEYS_ARGS_TOTAL_SIZE(crypto_keys_args));
209 idx = UTUN_CRYPTO_DIR_TO_IDX(crypto_keys_args->dir);
214 if (crypto_keys_args->type != crypto_ctx->type) {
223 if (crypto_keys_args->args_ulen != sizeof(crypto_keys_args->u)) {
228 if (crypto_keys_args->type == UTUN_CRYPTO_TYPE_IPSEC) {
230 if ((err = utun_ctl_config_crypto_keys_ipsec(pcb, crypto_keys_args, crypto_keys))) {
239 crypto_keys->type = crypto_keys_args->type;
271 utun_crypto_keys_args_t *crypto_keys_args = (__typeof__(crypto_keys_args))data;
275 if (crypto_keys_args->ver == 0 || crypto_keys_args->ver >= UTUN_CRYPTO_KEYS_ARGS_VER_MAX) {
276 printf("%s: ver check failed %d\n", __FUNCTION__, crypto_keys_args->ver);
279 if (crypto_keys_args->dir == 0 || crypto_keys_args->dir >= UTUN_CRYPTO_DIR_MAX) {
280 printf("%s: dir check failed %d\n", __FUNCTION__, crypto_keys_args->dir);
283 if (crypto_keys_args->type == 0 || crypto_keys_args->type >= UTUN_CRYPTO_TYPE_MAX) {
284 printf("%s: type check failed %d\n", __FUNCTION__, crypto_keys_args->type);
287 if (len < UTUN_CRYPTO_KEYS_ARGS_TOTAL_SIZE(crypto_keys_args)) {
289 (int)len, (int)UTUN_CRYPTO_KEYS_ARGS_TOTAL_SIZE(crypto_keys_args));
292 idx = UTUN_CRYPTO_DIR_TO_IDX(crypto_keys_args->dir);
297 if (crypto_keys_args->type != crypto_ctx->type) {
301 if (crypto_keys_args->args_ulen != sizeof(crypto_keys_args->u)) {
311 if (crypto_keys_args->type == UTUN_CRYPTO_TYPE_IPSEC) {
312 if (crypto_keys_args->u.ipsec_v1.spi == cur_crypto_keys->state.u.ipsec.spi) {
314 if ((err = utun_ctl_unconfig_crypto_keys_ipsec(crypto_keys_args, cur_crypto_keys))) {