keydb.h (c398230b64aea809cb7c5cea8db580af7097920c) | keydb.h (a0196c3c891ccf2ee88854f9798fd8e44d0e9f16) |
---|---|
1/* $FreeBSD$ */ 2/* $KAME: keydb.h,v 1.14 2000/08/02 17:58:26 sakane Exp $ */ 3 4/*- 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 46 unchanged lines hidden (view full) --- 55 union sockaddr_union src; /* srouce address for SA */ 56 union sockaddr_union dst; /* destination address for SA */ 57 u_int16_t proto; /* IPPROTO_ESP or IPPROTO_AH */ 58 u_int8_t mode; /* mode of protocol, see ipsec.h */ 59 u_int32_t reqid; /* reqid id who owned this SA */ 60 /* see IPSEC_MANUAL_REQID_MAX. */ 61}; 62 | 1/* $FreeBSD$ */ 2/* $KAME: keydb.h,v 1.14 2000/08/02 17:58:26 sakane Exp $ */ 3 4/*- 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 46 unchanged lines hidden (view full) --- 55 union sockaddr_union src; /* srouce address for SA */ 56 union sockaddr_union dst; /* destination address for SA */ 57 u_int16_t proto; /* IPPROTO_ESP or IPPROTO_AH */ 58 u_int8_t mode; /* mode of protocol, see ipsec.h */ 59 u_int32_t reqid; /* reqid id who owned this SA */ 60 /* see IPSEC_MANUAL_REQID_MAX. */ 61}; 62 |
63/* 64 * In order to split out the keydb implementation from that of the 65 * PF_KEY sockets we need to define a few structures that while they 66 * may seem common are likely to diverge over time. 67 */ 68 69/* sadb_identity */ 70struct secident { 71 u_int16_t type; 72 u_int64_t id; 73}; 74 75/* sadb_key */ 76struct seckey { 77 u_int16_t bits; 78 char *key_data; 79}; 80 81struct seclifetime { 82 u_int32_t allocations; 83 u_int64_t bytes; 84 u_int64_t addtime; 85 u_int64_t usetime; 86}; 87 |
|
63/* Security Association Data Base */ 64struct secashead { 65 LIST_ENTRY(secashead) chain; 66 67 struct secasindex saidx; 68 | 88/* Security Association Data Base */ 89struct secashead { 90 LIST_ENTRY(secashead) chain; 91 92 struct secasindex saidx; 93 |
69 struct sadb_ident *idents; /* source identity */ 70 struct sadb_ident *identd; /* destination identity */ | 94 struct secident *idents; /* source identity */ 95 struct secident *identd; /* destination identity */ |
71 /* XXX I don't know how to use them. */ 72 73 u_int8_t state; /* MATURE or DEAD. */ 74 LIST_HEAD(_satree, secasvar) savtree[SADB_SASTATE_MAX+1]; 75 /* SA chain */ 76 /* The first of this list is newer SA */ 77 78 struct route sa_route; /* route cache */ --- 13 unchanged lines hidden (view full) --- 92 u_int8_t state; /* Status of this Association */ 93 94 u_int8_t alg_auth; /* Authentication Algorithm Identifier*/ 95 u_int8_t alg_enc; /* Cipher Algorithm Identifier */ 96 u_int8_t alg_comp; /* Compression Algorithm Identifier */ 97 u_int32_t spi; /* SPI Value, network byte order */ 98 u_int32_t flags; /* holder for SADB_KEY_FLAGS */ 99 | 96 /* XXX I don't know how to use them. */ 97 98 u_int8_t state; /* MATURE or DEAD. */ 99 LIST_HEAD(_satree, secasvar) savtree[SADB_SASTATE_MAX+1]; 100 /* SA chain */ 101 /* The first of this list is newer SA */ 102 103 struct route sa_route; /* route cache */ --- 13 unchanged lines hidden (view full) --- 117 u_int8_t state; /* Status of this Association */ 118 119 u_int8_t alg_auth; /* Authentication Algorithm Identifier*/ 120 u_int8_t alg_enc; /* Cipher Algorithm Identifier */ 121 u_int8_t alg_comp; /* Compression Algorithm Identifier */ 122 u_int32_t spi; /* SPI Value, network byte order */ 123 u_int32_t flags; /* holder for SADB_KEY_FLAGS */ 124 |
100 struct sadb_key *key_auth; /* Key for Authentication */ 101 struct sadb_key *key_enc; /* Key for Encryption */ | 125 struct seckey *key_auth; /* Key for Authentication */ 126 struct seckey *key_enc; /* Key for Encryption */ |
102 caddr_t iv; /* Initilization Vector */ 103 u_int ivlen; /* length of IV */ 104 void *sched; /* intermediate encryption key */ 105 size_t schedlen; 106 107 struct secreplay *replay; /* replay prevention */ 108 time_t created; /* for lifetime */ 109 | 127 caddr_t iv; /* Initilization Vector */ 128 u_int ivlen; /* length of IV */ 129 void *sched; /* intermediate encryption key */ 130 size_t schedlen; 131 132 struct secreplay *replay; /* replay prevention */ 133 time_t created; /* for lifetime */ 134 |
110 struct sadb_lifetime *lft_c; /* CURRENT lifetime, it's constant. */ 111 struct sadb_lifetime *lft_h; /* HARD lifetime */ 112 struct sadb_lifetime *lft_s; /* SOFT lifetime */ | 135 struct seclifetime *lft_c; /* CURRENT lifetime, it's constant. */ 136 struct seclifetime *lft_h; /* HARD lifetime */ 137 struct seclifetime *lft_s; /* SOFT lifetime */ |
113 114 u_int32_t seq; /* sequence number */ 115 pid_t pid; /* message's pid */ 116 117 struct secashead *sah; /* back pointer to the secashead */ 118 119 /* 120 * NB: Fields with a tdb_ prefix are part of the "glue" used --- 70 unchanged lines hidden --- | 138 139 u_int32_t seq; /* sequence number */ 140 pid_t pid; /* message's pid */ 141 142 struct secashead *sah; /* back pointer to the secashead */ 143 144 /* 145 * NB: Fields with a tdb_ prefix are part of the "glue" used --- 70 unchanged lines hidden --- |