27 #include <sys/stropts.h>
28 #include <sys/strsun.h>
29 #include <sys/socketvar.h>
30 #include <sys/sockfilter.h>
31 #include <inet/kssl/ksslapi.h>
32 #include <sys/note.h>
33 #include <sys/taskq.h>
34
35 /*
36 * Name of the KSSL filter
37 */
38 #define KSSL_FILNAME "ksslf"
39
40 static struct modlmisc ksslf_modlmisc = {
41 &mod_miscops,
42 "Kernel SSL socket filter"
43 };
44
45 static struct modlinkage ksslf_modlinkage = {
46 MODREV_1,
47 &ksslf_modlmisc,
48 NULL
49 };
50
51 /*
52 * kssl filter cookie
53 */
54 typedef struct ksslf {
55 boolean_t ksslf_pending; /* waiting for 1st SSL rec. */
56 boolean_t ksslf_inhandshake; /* during SSL handshake */
57 kssl_ent_t ksslf_ent; /* SSL table entry */
58 kssl_ctx_t ksslf_ctx; /* SSL session */
59 kssl_endpt_type_t ksslf_type; /* is proxy/is proxied/none */
60 struct sockaddr_in6 ksslf_laddr; /* local address */
61 socklen_t ksslf_laddrlen;
62 struct ksslf *ksslf_listener;
63 } ksslf_t;
64
65 static void kssl_input_callback(void *, mblk_t *, kssl_cmd_t);
66
67 /*
68 * Allocate kssl state
|
27 #include <sys/stropts.h>
28 #include <sys/strsun.h>
29 #include <sys/socketvar.h>
30 #include <sys/sockfilter.h>
31 #include <inet/kssl/ksslapi.h>
32 #include <sys/note.h>
33 #include <sys/taskq.h>
34
35 /*
36 * Name of the KSSL filter
37 */
38 #define KSSL_FILNAME "ksslf"
39
40 static struct modlmisc ksslf_modlmisc = {
41 &mod_miscops,
42 "Kernel SSL socket filter"
43 };
44
45 static struct modlinkage ksslf_modlinkage = {
46 MODREV_1,
47 { &ksslf_modlmisc, NULL }
48 };
49
50 /*
51 * kssl filter cookie
52 */
53 typedef struct ksslf {
54 boolean_t ksslf_pending; /* waiting for 1st SSL rec. */
55 boolean_t ksslf_inhandshake; /* during SSL handshake */
56 kssl_ent_t ksslf_ent; /* SSL table entry */
57 kssl_ctx_t ksslf_ctx; /* SSL session */
58 kssl_endpt_type_t ksslf_type; /* is proxy/is proxied/none */
59 struct sockaddr_in6 ksslf_laddr; /* local address */
60 socklen_t ksslf_laddrlen;
61 struct ksslf *ksslf_listener;
62 } ksslf_t;
63
64 static void kssl_input_callback(void *, mblk_t *, kssl_cmd_t);
65
66 /*
67 * Allocate kssl state
|