Changeset View
Changeset View
Standalone View
Standalone View
sys/opencrypto/cryptodev.c
| Show First 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | |||||
| }; | }; | ||||
| static int cryptof_ioctl(struct file *, u_long, void *, | static int cryptof_ioctl(struct file *, u_long, void *, | ||||
| struct ucred *, struct thread *); | struct ucred *, struct thread *); | ||||
| static int cryptof_stat(struct file *, struct stat *, | static int cryptof_stat(struct file *, struct stat *, | ||||
| struct ucred *, struct thread *); | struct ucred *, struct thread *); | ||||
| static int cryptof_close(struct file *, struct thread *); | static int cryptof_close(struct file *, struct thread *); | ||||
| static int cryptof_fill_kinfo(struct file *, struct kinfo_file *, | static int cryptof_fill_kinfo(struct file *, struct kinfo_file *, | ||||
| struct filedesc *); | struct filedesc *, int); | ||||
| static struct fileops cryptofops = { | static struct fileops cryptofops = { | ||||
| .fo_read = invfo_rdwr, | .fo_read = invfo_rdwr, | ||||
| .fo_write = invfo_rdwr, | .fo_write = invfo_rdwr, | ||||
| .fo_truncate = invfo_truncate, | .fo_truncate = invfo_truncate, | ||||
| .fo_ioctl = cryptof_ioctl, | .fo_ioctl = cryptof_ioctl, | ||||
| .fo_poll = invfo_poll, | .fo_poll = invfo_poll, | ||||
| .fo_kqfilter = invfo_kqfilter, | .fo_kqfilter = invfo_kqfilter, | ||||
| ▲ Show 20 Lines • Show All 879 Lines • ▼ Show 20 Lines | while ((cse = TAILQ_FIRST(&fcr->csessions))) { | ||||
| (void)csefree(cse); | (void)csefree(cse); | ||||
| } | } | ||||
| free(fcr, M_XDATA); | free(fcr, M_XDATA); | ||||
| fp->f_data = NULL; | fp->f_data = NULL; | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| static int | static int | ||||
| cryptof_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) | cryptof_fill_kinfo(struct file *fp, struct kinfo_file *kif, | ||||
| struct filedesc *fdp, int lkflags) | |||||
| { | { | ||||
| kif->kf_type = KF_TYPE_CRYPTO; | kif->kf_type = KF_TYPE_CRYPTO; | ||||
| return (0); | return (0); | ||||
| } | } | ||||
| static struct csession * | static struct csession * | ||||
| csefind(struct fcrypt *fcr, u_int ses) | csefind(struct fcrypt *fcr, u_int ses) | ||||
| ▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines | |||||