summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-02 23:37:34 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-02 23:37:34 +0000
commit70a5b5460e0c9e4c7030d1721e5e1ecb1ac6074c (patch)
tree9988541ac915a5d5939eab373e16688dbdfaed4e /sbin
parentec64bf136949bf631bab5f5c707b24bde0914530 (diff)
rename SADB_foo_X_bar to SADB_X_foo_bar
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipsecadm/ipsecadm.c58
-rw-r--r--sbin/isakmpd/pf_key_v2.c32
-rw-r--r--sbin/photurisd/kernel.c46
-rw-r--r--sbin/photurisd/kernel.h14
4 files changed, 75 insertions, 75 deletions
diff --git a/sbin/ipsecadm/ipsecadm.c b/sbin/ipsecadm/ipsecadm.c
index 086dfc018e4..218a1c21cf5 100644
--- a/sbin/ipsecadm/ipsecadm.c
+++ b/sbin/ipsecadm/ipsecadm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsecadm.c,v 1.19 1999/06/05 19:32:57 deraadt Exp $ */
+/* $OpenBSD: ipsecadm.c,v 1.20 1999/07/02 23:37:32 deraadt Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -88,14 +88,14 @@ typedef struct {
transform xf[] = {
{"des", SADB_EALG_DESCBC, XF_ENC |ESP_OLD|ESP_NEW},
{"3des", SADB_EALG_3DESCBC, XF_ENC |ESP_OLD|ESP_NEW},
- {"blf", SADB_EALG_X_BLF, XF_ENC | ESP_NEW},
- {"cast", SADB_EALG_X_CAST, XF_ENC | ESP_NEW},
- {"skipjack", SADB_EALG_X_SKIPJACK, XF_ENC | ESP_NEW},
+ {"blf", SADB_X_EALG_BLF, XF_ENC | ESP_NEW},
+ {"cast", SADB_X_EALG_CAST, XF_ENC | ESP_NEW},
+ {"skipjack", SADB_X_EALG_SKIPJACK, XF_ENC | ESP_NEW},
{"md5", SADB_AALG_MD5HMAC96, XF_AUTH|AH_NEW|ESP_NEW},
{"sha1", SADB_AALG_SHA1HMAC96,XF_AUTH|AH_NEW|ESP_NEW},
- {"md5", SADB_AALG_X_MD5, XF_AUTH|AH_OLD},
- {"sha1", SADB_AALG_X_SHA1,XF_AUTH|AH_OLD},
- {"rmd160", SADB_AALG_X_RIPEMD160HMAC96, XF_AUTH|AH_NEW|ESP_NEW},
+ {"md5", SADB_X_AALG_MD5, XF_AUTH|AH_OLD},
+ {"sha1", SADB_X_AALG_SHA1,XF_AUTH|AH_OLD},
+ {"rmd160", SADB_X_AALG_RIPEMD160HMAC96, XF_AUTH|AH_NEW|ESP_NEW},
};
void
@@ -269,7 +269,7 @@ main(int argc, char **argv)
sa.sadb_sa_state = SADB_SASTATE_MATURE;
/* Initialize */
- sa2.sadb_sa_exttype = SADB_EXT_X_SA2;
+ sa2.sadb_sa_exttype = SADB_X_EXT_SA2;
sa2.sadb_sa_len = sizeof(sa2) / 8;
sa2.sadb_sa_replay = 0;
sa2.sadb_sa_state = SADB_SASTATE_MATURE;
@@ -315,14 +315,14 @@ main(int argc, char **argv)
{
mode = ESP_OLD;
smsg.sadb_msg_type = SADB_ADD;
- smsg.sadb_msg_satype = SADB_SATYPE_X_ESP_OLD;
+ smsg.sadb_msg_satype = SADB_X_SATYPE_ESP_OLD;
}
else
if (!strcmp(argv[2], "ah"))
{
mode = AH_OLD;
smsg.sadb_msg_type = SADB_ADD;
- smsg.sadb_msg_satype = SADB_SATYPE_X_AH_OLD;
+ smsg.sadb_msg_satype = SADB_X_SATYPE_AH_OLD;
}
else
{
@@ -370,7 +370,7 @@ main(int argc, char **argv)
{
mode = ENC_IP;
smsg.sadb_msg_type = SADB_ADD;
- smsg.sadb_msg_satype = SADB_SATYPE_X_IPIP;
+ smsg.sadb_msg_satype = SADB_X_SATYPE_IPIP;
i++;
}
else
@@ -463,7 +463,7 @@ main(int argc, char **argv)
if (mode & ESP_OLD)
if (strlen(argv[i + 2]) == 4)
- sa.sadb_sa_flags |= SADB_SAFLAGS_X_HALFIV;
+ sa.sadb_sa_flags |= SADB_X_SAFLAGS_HALFIV;
i++;
continue;
@@ -533,7 +533,7 @@ main(int argc, char **argv)
if (!strcmp(argv[i] + 1, "forcetunnel") && isencauth(mode))
{
- sa.sadb_sa_flags |= SADB_SAFLAGS_X_TUNNEL;
+ sa.sadb_sa_flags |= SADB_X_SAFLAGS_TUNNEL;
continue;
}
@@ -547,7 +547,7 @@ main(int argc, char **argv)
exit(1);
}
- sa.sadb_sa_flags |= SADB_SAFLAGS_X_HALFIV;
+ sa.sadb_sa_flags |= SADB_X_SAFLAGS_HALFIV;
continue;
}
@@ -559,7 +559,7 @@ main(int argc, char **argv)
if (!strcmp(argv[i] + 1, "local") && iscmd(mode, FLOW))
{
- sa.sadb_sa_flags |= SADB_SAFLAGS_X_LOCALFLOW;
+ sa.sadb_sa_flags |= SADB_X_SAFLAGS_LOCALFLOW;
continue;
}
@@ -567,17 +567,17 @@ main(int argc, char **argv)
(isencauth(mode) || mode == ENC_IP) && ( i + 2 < argc))
{
i += 2;
- sa.sadb_sa_flags |= SADB_SAFLAGS_X_TUNNEL;
+ sa.sadb_sa_flags |= SADB_X_SAFLAGS_TUNNEL;
continue;
}
if (!strcmp(argv[i] + 1, "addr") && iscmd(mode, FLOW) &&
(i + 4 < argc))
{
- sad4.sadb_address_exttype = SADB_EXT_X_SRC_FLOW;
- sad5.sadb_address_exttype = SADB_EXT_X_DST_FLOW;
- sad6.sadb_address_exttype = SADB_EXT_X_SRC_MASK;
- sad7.sadb_address_exttype = SADB_EXT_X_DST_MASK;
+ sad4.sadb_address_exttype = SADB_X_EXT_SRC_FLOW;
+ sad5.sadb_address_exttype = SADB_X_EXT_DST_FLOW;
+ sad6.sadb_address_exttype = SADB_X_EXT_SRC_MASK;
+ sad7.sadb_address_exttype = SADB_X_EXT_DST_MASK;
sad4.sadb_address_len = (sizeof(sad4) +
sizeof(struct sockaddr_in)) / 8;
@@ -648,7 +648,7 @@ main(int argc, char **argv)
}
sprotocol.sadb_protocol_len = 1;
- sprotocol.sadb_protocol_exttype = SADB_EXT_X_PROTOCOL;
+ sprotocol.sadb_protocol_exttype = SADB_X_EXT_PROTOCOL;
sprotocol.sadb_protocol_proto = tproto;
i++;
continue;
@@ -720,7 +720,7 @@ main(int argc, char **argv)
{
sad8.sadb_address_len = (sizeof(sad8) +
sizeof(struct sockaddr_in)) / 8;
- sad8.sadb_address_exttype = SADB_EXT_X_DST2;
+ sad8.sadb_address_exttype = SADB_X_EXT_DST2;
dst2.sin.sin_family = AF_INET;
dst2.sin.sin_len = sizeof(struct sockaddr_in);
dst2set = inet_aton(argv[i + 1], &dst2.sin.sin_addr) != -1 ? 1 : 0;
@@ -748,7 +748,7 @@ main(int argc, char **argv)
else
if (!strcasecmp(argv[i + 1], "ip4"))
{
- smsg.sadb_msg_satype = SADB_SATYPE_X_IPIP;
+ smsg.sadb_msg_satype = SADB_X_SATYPE_IPIP;
proto = IPPROTO_IPIP;
}
else
@@ -778,7 +778,7 @@ main(int argc, char **argv)
smsg.sadb_msg_satype = SADB_SATYPE_AH;
else
if (proto == IPPROTO_IPIP)
- smsg.sadb_msg_satype = SADB_SATYPE_X_IPIP;
+ smsg.sadb_msg_satype = SADB_X_SATYPE_IPIP;
}
i++;
@@ -804,7 +804,7 @@ main(int argc, char **argv)
else
if (!strcasecmp(argv[i + 1], "ip4"))
{
- sprotocol.sadb_protocol_proto = SADB_SATYPE_X_IPIP;
+ sprotocol.sadb_protocol_proto = SADB_X_SATYPE_IPIP;
proto2 = IPPROTO_IPIP;
}
else
@@ -835,20 +835,20 @@ main(int argc, char **argv)
sprotocol.sadb_protocol_proto = SADB_SATYPE_AH;
else
if (proto2 == IPPROTO_IPIP)
- sprotocol.sadb_protocol_proto = SADB_SATYPE_X_IPIP;
+ sprotocol.sadb_protocol_proto = SADB_X_SATYPE_IPIP;
}
- sprotocol.sadb_protocol_exttype = SADB_EXT_X_PROTOCOL;
+ sprotocol.sadb_protocol_exttype = SADB_X_EXT_PROTOCOL;
sprotocol.sadb_protocol_len = 1;
i++;
continue;
}
if (!strcmp(argv[i] + 1, "chain") &&
- !(sa.sadb_sa_flags & SADB_SAFLAGS_X_CHAINDEL) &&
+ !(sa.sadb_sa_flags & SADB_X_SAFLAGS_CHAINDEL) &&
iscmd(mode, DEL_SPI))
{
- sa.sadb_sa_flags |= SADB_SAFLAGS_X_CHAINDEL;
+ sa.sadb_sa_flags |= SADB_X_SAFLAGS_CHAINDEL;
continue;
}
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c
index 3c8120f00e7..de7549f169e 100644
--- a/sbin/isakmpd/pf_key_v2.c
+++ b/sbin/isakmpd/pf_key_v2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_key_v2.c,v 1.11 1999/06/02 06:34:53 niklas Exp $ */
+/* $OpenBSD: pf_key_v2.c,v 1.12 1999/07/02 23:37:32 deraadt Exp $ */
/* $EOM: pf_key_v2.c,v 1.16 1999/05/25 08:06:26 niklas Exp $ */
/*
@@ -655,15 +655,15 @@ pf_key_v2_set_spi (struct sa *sa, struct proto *proto, int incoming)
ssa.sadb_sa_encrypt = SADB_EALG_3DESCBC;
break;
-#ifdef SADB_EALG_X_CAST
+#ifdef SADB_X_EALG_CAST
case IPSEC_ESP_CAST:
- ssa.sadb_sa_encrypt = SADB_EALG_X_CAST;
+ ssa.sadb_sa_encrypt = SADB_X_EALG_CAST;
break;
#endif
-#ifdef SADB_EALG_X_BLF
+#ifdef SADB_X_EALG_BLF
case IPSEC_ESP_BLOWFISH:
- ssa.sadb_sa_encrypt = SADB_EALG_X_BLF;
+ ssa.sadb_sa_encrypt = SADB_X_EALG_BLF;
break;
#endif
@@ -730,9 +730,9 @@ pf_key_v2_set_spi (struct sa *sa, struct proto *proto, int incoming)
ssa.sadb_sa_replay
= conf_get_str ("General", "Shared-SADB") ? 0 : iproto->replay_window;
ssa.sadb_sa_state = SADB_SASTATE_MATURE;
-#ifdef SADB_SAFLAGS_X_TUNNEL
+#ifdef SADB_X_SAFLAGS_TUNNEL
ssa.sadb_sa_flags
- = iproto->encap_mode == IPSEC_ENCAP_TUNNEL ? SADB_SAFLAGS_X_TUNNEL : 0;
+ = iproto->encap_mode == IPSEC_ENCAP_TUNNEL ? SADB_X_SAFLAGS_TUNNEL : 0;
#else
ssa.sadb_sa_flags = 0;
#endif
@@ -1007,9 +1007,9 @@ pf_key_v2_flow (in_addr_t laddr, in_addr_t lmask, in_addr_t raddr,
* XXX The LOCALFLOW flag should only be set if this machine is part of the
* source subnet.
*/
- ssa.sadb_sa_flags = SADB_SAFLAGS_X_LOCALFLOW;
+ ssa.sadb_sa_flags = SADB_X_SAFLAGS_LOCALFLOW;
if (!delete)
- ssa.sadb_sa_flags |= SADB_SAFLAGS_X_REPLACEFLOW;
+ ssa.sadb_sa_flags |= SADB_X_SAFLAGS_REPLACEFLOW;
if (pf_key_v2_msg_add (flow, (struct sadb_ext *)&ssa, 0) == -1)
goto cleanup;
@@ -1046,7 +1046,7 @@ pf_key_v2_flow (in_addr_t laddr, in_addr_t lmask, in_addr_t raddr,
addr = malloc (len);
if (!addr)
goto cleanup;
- addr->sadb_address_exttype = SADB_EXT_X_SRC_FLOW;
+ addr->sadb_address_exttype = SADB_X_EXT_SRC_FLOW;
addr->sadb_address_len = len / PF_KEY_V2_CHUNK;
#if 0
addr->sadb_address_proto = 0;
@@ -1066,7 +1066,7 @@ pf_key_v2_flow (in_addr_t laddr, in_addr_t lmask, in_addr_t raddr,
addr = malloc (len);
if (!addr)
goto cleanup;
- addr->sadb_address_exttype = SADB_EXT_X_SRC_MASK;
+ addr->sadb_address_exttype = SADB_X_EXT_SRC_MASK;
addr->sadb_address_len = len / PF_KEY_V2_CHUNK;
#if 0
addr->sadb_address_proto = 0;
@@ -1086,7 +1086,7 @@ pf_key_v2_flow (in_addr_t laddr, in_addr_t lmask, in_addr_t raddr,
addr = malloc (len);
if (!addr)
goto cleanup;
- addr->sadb_address_exttype = SADB_EXT_X_DST_FLOW;
+ addr->sadb_address_exttype = SADB_X_EXT_DST_FLOW;
addr->sadb_address_len = len / PF_KEY_V2_CHUNK;
#if 0
addr->sadb_address_proto = 0;
@@ -1106,7 +1106,7 @@ pf_key_v2_flow (in_addr_t laddr, in_addr_t lmask, in_addr_t raddr,
addr = malloc (len);
if (!addr)
goto cleanup;
- addr->sadb_address_exttype = SADB_EXT_X_DST_MASK;
+ addr->sadb_address_exttype = SADB_X_EXT_DST_MASK;
addr->sadb_address_len = len / PF_KEY_V2_CHUNK;
#if 0
addr->sadb_address_proto = 0;
@@ -1513,7 +1513,7 @@ pf_key_v2_group_spis (struct sa *sa, struct proto *proto1,
if (pf_key_v2_msg_add (grpspis, (struct sadb_ext *)&sa1, 0) == -1)
goto cleanup;
- sa2.sadb_sa_exttype = SADB_EXT_X_SA2;
+ sa2.sadb_sa_exttype = SADB_X_EXT_SA2;
sa2.sadb_sa_len = sizeof sa2 / PF_KEY_V2_CHUNK;
memcpy (&sa2.sadb_sa_spi, proto2->spi[incoming], sizeof sa2.sadb_sa_spi);
sa2.sadb_sa_replay = 0;
@@ -1554,7 +1554,7 @@ pf_key_v2_group_spis (struct sa *sa, struct proto *proto1,
addr = malloc (len);
if (!addr)
goto cleanup;
- addr->sadb_address_exttype = SADB_EXT_X_DST2;
+ addr->sadb_address_exttype = SADB_X_EXT_DST2;
addr->sadb_address_len = len / PF_KEY_V2_CHUNK;
#if 0
addr->sadb_address_proto = 0;
@@ -1569,7 +1569,7 @@ pf_key_v2_group_spis (struct sa *sa, struct proto *proto1,
addr = 0;
/* Setup the PROTOCOL extension. */
- protocol.sadb_protocol_exttype = SADB_EXT_X_PROTOCOL;
+ protocol.sadb_protocol_exttype = SADB_X_EXT_PROTOCOL;
protocol.sadb_protocol_len = sizeof protocol / PF_KEY_V2_CHUNK;
switch (proto2->proto)
{
diff --git a/sbin/photurisd/kernel.c b/sbin/photurisd/kernel.c
index 0a3ec33c2ac..1d20d17bdaf 100644
--- a/sbin/photurisd/kernel.c
+++ b/sbin/photurisd/kernel.c
@@ -39,7 +39,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: kernel.c,v 1.3 1999/03/31 20:33:45 niklas Exp $";
+static char rcsid[] = "$Id: kernel.c,v 1.4 1999/07/02 23:37:33 deraadt Exp $";
#endif
#include <time.h>
@@ -534,7 +534,7 @@ kernel_ah(attrib_t *ob, struct spiob *SPI, u_int8_t *secrets, int hmac)
sa.sadb_msg_type = SPI->flags & SPI_OWNER ?
SADB_UPDATE : SADB_ADD;
sa.sadb_msg_satype = !hmac ?
- SADB_SATYPE_X_AH_OLD : SADB_SATYPE_AH;
+ SADB_X_SATYPE_AH_OLD : SADB_SATYPE_AH;
sa.sadb_msg_seq = pfkey_seq++;
sa.sadb_msg_pid = pfkey_pid;
iov[cnt].iov_base = &sa;
@@ -576,7 +576,7 @@ kernel_ah(attrib_t *ob, struct spiob *SPI, u_int8_t *secrets, int hmac)
sr.sadb_sa_auth = xf->kernel_id;
sr.sadb_sa_encrypt = 0;
if (SPI->flags & SPI_TUNNEL)
- sr.sadb_sa_flags |= SADB_SAFLAGS_X_TUNNEL;
+ sr.sadb_sa_flags |= SADB_X_SAFLAGS_TUNNEL;
sa.sadb_msg_len += sr.sadb_sa_len;
iov[cnt].iov_base = &sr;
@@ -678,7 +678,7 @@ kernel_esp(attrib_t *ob, attrib_t *ob2, struct spiob *SPI, u_int8_t *secrets)
sa.sadb_msg_type = SPI->flags & SPI_OWNER ?
SADB_UPDATE : SADB_ADD;
sa.sadb_msg_satype = xf_enc->flags & ESP_OLD ?
- SADB_SATYPE_X_ESP_OLD : SADB_SATYPE_ESP;
+ SADB_X_SATYPE_ESP_OLD : SADB_SATYPE_ESP;
sa.sadb_msg_seq = pfkey_seq++;
sa.sadb_msg_pid = pfkey_pid;
iov[cnt].iov_base = &sa;
@@ -692,9 +692,9 @@ kernel_esp(attrib_t *ob, attrib_t *ob2, struct spiob *SPI, u_int8_t *secrets)
sr.sadb_sa_auth = attauth ? xf_auth->kernel_id : 0;
sr.sadb_sa_encrypt = xf_enc->kernel_id;
if (xf_enc->flags & ESP_OLD)
- sr.sadb_sa_flags |= SADB_SAFLAGS_X_HALFIV;
+ sr.sadb_sa_flags |= SADB_X_SAFLAGS_HALFIV;
if (SPI->flags & SPI_TUNNEL)
- sr.sadb_sa_flags |= SADB_SAFLAGS_X_TUNNEL;
+ sr.sadb_sa_flags |= SADB_X_SAFLAGS_TUNNEL;
sa.sadb_msg_len += sr.sadb_sa_len;
iov[cnt].iov_base = &sr;
@@ -817,7 +817,7 @@ kernel_group_spi(char *address, u_int8_t *spi)
iov[cnt++].iov_len = sizeof(sa);
sa2.sadb_sa_len = sizeof(sa2) / 8;
- sa2.sadb_sa_exttype = SADB_EXT_X_SA2;
+ sa2.sadb_sa_exttype = SADB_X_EXT_SA2;
sa2.sadb_sa_spi = htonl(SPI);
sa2.sadb_sa_state = SADB_SASTATE_MATURE;
smsg.sadb_msg_len += sa2.sadb_sa_len;
@@ -837,7 +837,7 @@ kernel_group_spi(char *address, u_int8_t *spi)
iov[cnt++].iov_len = sizeof(struct sockaddr_in);
sad2.sadb_address_len = (sizeof(sad2) + sizeof(struct sockaddr_in)) / 8;
- sad2.sadb_address_exttype = SADB_EXT_X_DST2;
+ sad2.sadb_address_exttype = SADB_X_EXT_DST2;
iov[cnt].iov_base = &sad2;
iov[cnt++].iov_len = sizeof(sad2);
dst2.sin.sin_family = AF_INET;
@@ -848,7 +848,7 @@ kernel_group_spi(char *address, u_int8_t *spi)
iov[cnt++].iov_len = sizeof(struct sockaddr_in);
sproto.sadb_protocol_len = sizeof(sproto) / 8;
- sproto.sadb_protocol_exttype = SADB_EXT_X_PROTOCOL;
+ sproto.sadb_protocol_exttype = SADB_X_EXT_PROTOCOL;
sproto.sadb_protocol_proto = SADB_SATYPE_AH;
smsg.sadb_msg_len += sproto.sadb_protocol_len;
iov[cnt].iov_base = &sproto;
@@ -906,7 +906,7 @@ kernel_bind_spis(struct spiob *spi1, struct spiob *spi2)
iov[cnt++].iov_len = sizeof(sa);
sa2.sadb_sa_len = sizeof(sa2) / 8;
- sa2.sadb_sa_exttype = SADB_EXT_X_SA2;
+ sa2.sadb_sa_exttype = SADB_X_EXT_SA2;
sa2.sadb_sa_spi = htonl(outspi);
sa2.sadb_sa_state = SADB_SASTATE_MATURE;
smsg.sadb_msg_len += sa2.sadb_sa_len;
@@ -926,7 +926,7 @@ kernel_bind_spis(struct spiob *spi1, struct spiob *spi2)
iov[cnt++].iov_len = sizeof(struct sockaddr_in);
sad2.sadb_address_len = (sizeof(sad2) + sizeof(struct sockaddr_in)) / 8;
- sad2.sadb_address_exttype = SADB_EXT_X_DST2;
+ sad2.sadb_address_exttype = SADB_X_EXT_DST2;
iov[cnt].iov_base = &sad2;
iov[cnt++].iov_len = sizeof(sad2);
dst2.sin.sin_family = AF_INET;
@@ -937,7 +937,7 @@ kernel_bind_spis(struct spiob *spi1, struct spiob *spi2)
iov[cnt++].iov_len = sizeof(struct sockaddr_in);
sproto.sadb_protocol_len = sizeof(sproto) / 8;
- sproto.sadb_protocol_exttype = SADB_EXT_X_PROTOCOL;
+ sproto.sadb_protocol_exttype = SADB_X_EXT_PROTOCOL;
sproto.sadb_protocol_proto = spi2->flags & SPI_ESP ?
SADB_SATYPE_ESP : SADB_SATYPE_AH;
smsg.sadb_msg_len += sproto.sadb_protocol_len;
@@ -1013,10 +1013,10 @@ kernel_enable_spi(in_addr_t isrc, in_addr_t ismask,
iov[cnt].iov_base = &dst;
iov[cnt++].iov_len = sizeof(struct sockaddr_in);
- sad1.sadb_address_exttype = SADB_EXT_X_SRC_FLOW;
- sad2.sadb_address_exttype = SADB_EXT_X_SRC_MASK;
- sad3.sadb_address_exttype = SADB_EXT_X_DST_FLOW;
- sad4.sadb_address_exttype = SADB_EXT_X_DST_MASK;
+ sad1.sadb_address_exttype = SADB_X_EXT_SRC_FLOW;
+ sad2.sadb_address_exttype = SADB_X_EXT_SRC_MASK;
+ sad3.sadb_address_exttype = SADB_X_EXT_DST_FLOW;
+ sad4.sadb_address_exttype = SADB_X_EXT_DST_MASK;
sad1.sadb_address_len = (sizeof(sad1) + sizeof(struct sockaddr_in)) / 8;
sad2.sadb_address_len = (sizeof(sad2) + sizeof(struct sockaddr_in)) / 8;
@@ -1109,10 +1109,10 @@ kernel_disable_spi(in_addr_t isrc, in_addr_t ismask,
iov[cnt].iov_base = &sa;
iov[cnt++].iov_len = sizeof(sa);
- sad1.sadb_address_exttype = SADB_EXT_X_SRC_FLOW;
- sad2.sadb_address_exttype = SADB_EXT_X_SRC_MASK;
- sad3.sadb_address_exttype = SADB_EXT_X_DST_FLOW;
- sad4.sadb_address_exttype = SADB_EXT_X_DST_MASK;
+ sad1.sadb_address_exttype = SADB_X_EXT_SRC_FLOW;
+ sad2.sadb_address_exttype = SADB_X_EXT_SRC_MASK;
+ sad3.sadb_address_exttype = SADB_X_EXT_DST_FLOW;
+ sad4.sadb_address_exttype = SADB_X_EXT_DST_MASK;
sad1.sadb_address_len = (sizeof(sad1) + sizeof(struct sockaddr_in)) / 8;
sad2.sadb_address_len = (sizeof(sad2) + sizeof(struct sockaddr_in)) / 8;
@@ -1354,7 +1354,7 @@ kernel_insert_spi(struct stateob *st, struct spiob *SPI)
if (kernel_enable_spi(SPI->isrc, SPI->ismask,
SPI->idst, SPI->idmask,
SPI->address, spi, proto,
- SADB_SAFLAGS_X_REPLACEFLOW | SADB_SAFLAGS_X_LOCALFLOW |
+ SADB_X_SAFLAGS_REPLACEFLOW | SADB_X_SAFLAGS_LOCALFLOW |
(vpn_mode ? /*ENABLE_FLAG_MODIFY*/ : 0)) == -1)
log_error(0, "kernel_enable_spi() in kernel_insert_spi()");
} else {
@@ -1414,7 +1414,7 @@ kernel_unlink_spi(struct spiob *ospi)
AT_AH_ATTRIB);
if (esp != NULL) {
- int flag = (vpn_mode ? /*ENABLE_FLAG_MODIFY*/ : 0) | SADB_SAFLAGS_X_LOCALFLOW;
+ int flag = (vpn_mode ? /*ENABLE_FLAG_MODIFY*/ : 0) | SADB_X_SAFLAGS_LOCALFLOW;
if (!(ospi->flags & SPI_OWNER) &&
kernel_disable_spi(ospi->isrc, ospi->ismask,
ospi->idst, ospi->idmask,
@@ -1429,7 +1429,7 @@ kernel_unlink_spi(struct spiob *ospi)
if (ah != NULL) {
if (esp == NULL) {
int flag = (vpn_mode ? /*ENABLE_FLAG_MODIFY*/ : 0) |
- SADB_SAFLAGS_X_LOCALFLOW;
+ SADB_X_SAFLAGS_LOCALFLOW;
if (!(ospi->flags & SPI_OWNER) &&
kernel_disable_spi(ospi->isrc, ospi->ismask,
ospi->idst, ospi->idmask,
diff --git a/sbin/photurisd/kernel.h b/sbin/photurisd/kernel.h
index 2ea93569664..727af26caf8 100644
--- a/sbin/photurisd/kernel.h
+++ b/sbin/photurisd/kernel.h
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $Id: kernel.h,v 1.3 1999/03/27 21:18:01 provos Exp $ */
+/* $Id: kernel.h,v 1.4 1999/07/02 23:37:33 deraadt Exp $ */
/*
* kernel.h:
* security paramter index creation.
@@ -62,16 +62,16 @@ typedef struct {
*/
transform xf[] = {
- { 5, SADB_AALG_X_MD5, XF_AUTH|AH_OLD},
- { 6, SADB_AALG_X_SHA1, XF_AUTH|AH_OLD},
+ { 5, SADB_X_AALG_MD5, XF_AUTH|AH_OLD},
+ { 6, SADB_X_AALG_SHA1, XF_AUTH|AH_OLD},
{ 5, SADB_AALG_MD5HMAC96, XF_AUTH|AH_NEW|ESP_NEW},
{ 6, SADB_AALG_SHA1HMAC96, XF_AUTH|AH_NEW|ESP_NEW},
- { 7, SADB_AALG_X_RIPEMD160HMAC96, XF_AUTH|AH_NEW|ESP_NEW},
+ { 7, SADB_X_AALG_RIPEMD160HMAC96, XF_AUTH|AH_NEW|ESP_NEW},
{ 8, SADB_EALG_DESCBC, XF_ENC|ESP_OLD},
{ 18, SADB_EALG_3DESCBC, XF_ENC|ESP_NEW},
- { 16, SADB_EALG_X_BLF, XF_ENC|ESP_NEW},
- { 17, SADB_EALG_X_CAST, XF_ENC|ESP_NEW},
- { 19, SADB_EALG_X_SKIPJACK, XF_ENC|ESP_NEW},
+ { 16, SADB_X_EALG_BLF, XF_ENC|ESP_NEW},
+ { 17, SADB_X_EALG_CAST, XF_ENC|ESP_NEW},
+ { 19, SADB_X_EALG_SKIPJACK, XF_ENC|ESP_NEW},
};
transform *kernel_get_transform(int id);