summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--sys/net/pfkeyv2.c72
-rw-r--r--sys/net/pfkeyv2.h46
-rw-r--r--sys/net/pfkeyv2_parsemessage.c36
-rw-r--r--sys/netinet/ip_xform.c14
8 files changed, 159 insertions, 159 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);
diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c
index f38c06d9ce4..f9aed42b41c 100644
--- a/sys/net/pfkeyv2.c
+++ b/sys/net/pfkeyv2.c
@@ -69,15 +69,15 @@ static int npromisc = 0;
static struct sadb_alg ealgs[] = {
{ SADB_EALG_DESCBC, 64, 64, 64 },
{ SADB_EALG_3DESCBC, 64, 192, 192 },
- { SADB_EALG_X_BLF, 64, 5, BLF_MAXKEYLEN},
- { SADB_EALG_X_CAST, 64, 5, 16},
- { SADB_EALG_X_SKIPJACK, 64, 10, 10},
+ { SADB_X_EALG_BLF, 64, 5, BLF_MAXKEYLEN},
+ { SADB_X_EALG_CAST, 64, 5, 16},
+ { SADB_X_EALG_SKIPJACK, 64, 10, 10},
};
static struct sadb_alg aalgs[] = {
{ SADB_AALG_SHA1HMAC96, 0, 160, 160 },
{ SADB_AALG_MD5HMAC96, 0, 128, 128 },
-{ SADB_AALG_X_RIPEMD160HMAC96, 0, 160, 160 }
+{ SADB_X_AALG_RIPEMD160HMAC96, 0, 160, 160 }
};
extern int pfkey_register(struct pfkey_version *version);
@@ -177,10 +177,10 @@ import_sa(struct tdb *tdb, struct sadb_sa *sadb_sa, struct ipsecinit *ii)
if (sadb_sa->sadb_sa_flags & SADB_SAFLAGS_PFS)
tdb->tdb_flags |= TDBF_PFS;
- if (sadb_sa->sadb_sa_flags & SADB_SAFLAGS_X_HALFIV)
+ if (sadb_sa->sadb_sa_flags & SADB_X_SAFLAGS_HALFIV)
tdb->tdb_flags |= TDBF_HALFIV;
- if (sadb_sa->sadb_sa_flags & SADB_SAFLAGS_X_TUNNEL)
+ if (sadb_sa->sadb_sa_flags & SADB_X_SAFLAGS_TUNNEL)
tdb->tdb_flags |= TDBF_TUNNELING;
}
@@ -211,10 +211,10 @@ export_sa(void **p, struct tdb *tdb)
sadb_sa->sadb_sa_flags |= SADB_SAFLAGS_PFS;
if (tdb->tdb_flags & TDBF_HALFIV)
- sadb_sa->sadb_sa_flags |= SADB_SAFLAGS_X_HALFIV;
+ sadb_sa->sadb_sa_flags |= SADB_X_SAFLAGS_HALFIV;
if (tdb->tdb_flags & TDBF_TUNNELING)
- sadb_sa->sadb_sa_flags |= SADB_SAFLAGS_X_TUNNEL;
+ sadb_sa->sadb_sa_flags |= SADB_X_SAFLAGS_TUNNEL;
*p += sizeof(struct sadb_sa);
}
@@ -754,7 +754,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
sa.tdb_sproto = IPPROTO_ESP;
break;
- case SADB_SATYPE_X_AH_OLD:
+ case SADB_X_SATYPE_AH_OLD:
if (!ah_enable) {
rval = EOPNOTSUPP;
goto ret;
@@ -762,7 +762,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
sa.tdb_sproto = IPPROTO_AH;
break;
- case SADB_SATYPE_X_ESP_OLD:
+ case SADB_X_SATYPE_ESP_OLD:
if (!esp_enable) {
rval = EOPNOTSUPP;
goto ret;
@@ -770,7 +770,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
sa.tdb_sproto = IPPROTO_ESP;
break;
- case SADB_SATYPE_X_IPIP:
+ case SADB_X_SATYPE_IPIP:
sa.tdb_sproto = IPPROTO_IPIP;
break;
@@ -839,7 +839,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
alg = XF_NEW_ESP;
break;
- case SADB_SATYPE_X_AH_OLD:
+ case SADB_X_SATYPE_AH_OLD:
if (!ah_enable) {
rval = EOPNOTSUPP;
goto splxret;
@@ -848,7 +848,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
alg = XF_OLD_AH;
break;
- case SADB_SATYPE_X_ESP_OLD:
+ case SADB_X_SATYPE_ESP_OLD:
if (!esp_enable) {
rval = EOPNOTSUPP;
goto splxret;
@@ -857,7 +857,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
alg = XF_OLD_ESP;
break;
- case SADB_SATYPE_X_IPIP:
+ case SADB_X_SATYPE_IPIP:
newsa->tdb_sproto = IPPROTO_IPIP;
alg = XF_IP4;
break;
@@ -965,7 +965,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
alg = XF_NEW_ESP;
break;
- case SADB_SATYPE_X_AH_OLD:
+ case SADB_X_SATYPE_AH_OLD:
if (!ah_enable) {
rval = EOPNOTSUPP;
goto splxret;
@@ -974,7 +974,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
alg = XF_OLD_AH;
break;
- case SADB_SATYPE_X_ESP_OLD:
+ case SADB_X_SATYPE_ESP_OLD:
if (!esp_enable) {
rval = EOPNOTSUPP;
goto splxret;
@@ -983,7 +983,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
alg = XF_OLD_ESP;
break;
- case SADB_SATYPE_X_IPIP:
+ case SADB_X_SATYPE_IPIP:
newsa->tdb_sproto = IPPROTO_IPIP;
alg = XF_IP4;
break;
@@ -1037,7 +1037,7 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
goto splxret;
}
- tdb_delete(sa2, ((struct sadb_sa *)headers[SADB_EXT_SA])->sadb_sa_flags & SADB_SAFLAGS_X_CHAINDEL, TDBEXP_TIMEOUT);
+ tdb_delete(sa2, ((struct sadb_sa *)headers[SADB_EXT_SA])->sadb_sa_flags & SADB_X_SAFLAGS_CHAINDEL, TDBEXP_TIMEOUT);
splx(s);
sa2 = NULL;
break;
@@ -1135,11 +1135,11 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
struct rtentry *rt;
/*
- * SADB_SAFLAGS_X_REPLACEFLOW set means we should remove any
+ * SADB_X_SAFLAGS_REPLACEFLOW set means we should remove any
* potentially conflicting flow while we are adding this new one.
*/
replace = ((struct sadb_sa *)headers[SADB_EXT_SA])->sadb_sa_flags &
- SADB_SAFLAGS_X_REPLACEFLOW;
+ SADB_X_SAFLAGS_REPLACEFLOW;
if (replace && delflag) {
rval = EINVAL;
goto ret;
@@ -1157,20 +1157,20 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
}
local = ((struct sadb_sa *)headers[SADB_EXT_SA])->sadb_sa_flags &
- SADB_SAFLAGS_X_LOCALFLOW;
+ SADB_X_SAFLAGS_LOCALFLOW;
bzero(&encapdst, sizeof(struct sockaddr_encap));
bzero(&encapnetmask, sizeof(struct sockaddr_encap));
bzero(&encapgw, sizeof(struct sockaddr_encap));
bzero(&alts, sizeof(alts));
bzero(&altm, sizeof(altm));
- src = (union sockaddr_union *) (headers[SADB_EXT_X_SRC_FLOW] + sizeof(struct sadb_address));
- dst = (union sockaddr_union *) (headers[SADB_EXT_X_DST_FLOW] + sizeof(struct sadb_address));
- srcmask = (union sockaddr_union *) (headers[SADB_EXT_X_SRC_MASK] + sizeof(struct sadb_address));
- dstmask = (union sockaddr_union *) (headers[SADB_EXT_X_DST_MASK] + sizeof(struct sadb_address));
+ src = (union sockaddr_union *) (headers[SADB_X_EXT_SRC_FLOW] + sizeof(struct sadb_address));
+ dst = (union sockaddr_union *) (headers[SADB_X_EXT_DST_FLOW] + sizeof(struct sadb_address));
+ srcmask = (union sockaddr_union *) (headers[SADB_X_EXT_SRC_MASK] + sizeof(struct sadb_address));
+ dstmask = (union sockaddr_union *) (headers[SADB_X_EXT_DST_MASK] + sizeof(struct sadb_address));
- if (headers[SADB_EXT_X_PROTOCOL])
- sproto = ((struct sadb_protocol *) headers[SADB_EXT_X_PROTOCOL])->sadb_protocol_proto;
+ if (headers[SADB_X_EXT_PROTOCOL])
+ sproto = ((struct sadb_protocol *) headers[SADB_X_EXT_PROTOCOL])->sadb_protocol_proto;
else
sproto = 0;
@@ -1458,10 +1458,10 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
goto splxret;
}
- tdb2 = gettdb(((struct sadb_sa *)headers[SADB_EXT_X_SA2])->sadb_sa_spi,
- (union sockaddr_union *)(headers[SADB_EXT_X_DST2] +
+ tdb2 = gettdb(((struct sadb_sa *)headers[SADB_X_EXT_SA2])->sadb_sa_spi,
+ (union sockaddr_union *)(headers[SADB_X_EXT_DST2] +
sizeof(struct sadb_address)),
- SADB_GETSPROTO(((struct sadb_protocol *)headers[SADB_EXT_X_PROTOCOL])->sadb_protocol_proto));
+ SADB_GETSPROTO(((struct sadb_protocol *)headers[SADB_X_EXT_PROTOCOL])->sadb_protocol_proto));
if (tdb2 == NULL) {
rval = ESRCH;
@@ -1512,10 +1512,10 @@ pfkeyv2_send(struct socket *socket, void *message, int len)
goto splxret;
}
- tdb2 = gettdb(((struct sadb_sa *)headers[SADB_EXT_X_SA2])->sadb_sa_spi,
- (union sockaddr_union *)(headers[SADB_EXT_X_DST2] +
+ tdb2 = gettdb(((struct sadb_sa *)headers[SADB_X_EXT_SA2])->sadb_sa_spi,
+ (union sockaddr_union *)(headers[SADB_X_EXT_DST2] +
sizeof(struct sadb_address)),
- SADB_GETSPROTO(((struct sadb_protocol *)headers[SADB_EXT_X_PROTOCOL])->sadb_protocol_proto));
+ SADB_GETSPROTO(((struct sadb_protocol *)headers[SADB_X_EXT_PROTOCOL])->sadb_protocol_proto));
if (tdb2 == NULL) {
rval = ESRCH;
@@ -1749,13 +1749,13 @@ pfkeyv2_expire(struct tdb *sa, u_int16_t type)
switch (sa->tdb_sproto) {
case IPPROTO_AH:
- satype = sa->tdb_xform->xf_type == XF_OLD_AH ? SADB_SATYPE_X_AH_OLD : SADB_SATYPE_AH;
+ satype = sa->tdb_xform->xf_type == XF_OLD_AH ? SADB_X_SATYPE_AH_OLD : SADB_SATYPE_AH;
break;
case IPPROTO_ESP:
- satype = sa->tdb_xform->xf_type == XF_OLD_ESP ? SADB_SATYPE_X_ESP_OLD : SADB_SATYPE_ESP;
+ satype = sa->tdb_xform->xf_type == XF_OLD_ESP ? SADB_X_SATYPE_ESP_OLD : SADB_SATYPE_ESP;
break;
case IPPROTO_IPIP:
- satype = SADB_SATYPE_X_IPIP;
+ satype = SADB_X_SATYPE_IPIP;
break;
default:
rval = EOPNOTSUPP;
diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h
index 3e0a1242db8..36f22763df6 100644
--- a/sys/net/pfkeyv2.h
+++ b/sys/net/pfkeyv2.h
@@ -160,9 +160,9 @@ struct sadb_protocol {
};
#define SADB_GETSPROTO(x) ( (x) == SADB_SATYPE_AH ? IPPROTO_AH :\
- (x) == SADB_SATYPE_X_AH_OLD ? IPPROTO_AH :\
+ (x) == SADB_X_SATYPE_AH_OLD ? IPPROTO_AH :\
(x) == SADB_SATYPE_ESP ? IPPROTO_ESP :\
- (x) == SADB_SATYPE_X_ESP_OLD ? IPPROTO_ESP :\
+ (x) == SADB_X_SATYPE_ESP_OLD ? IPPROTO_ESP :\
IPPROTO_IPIP )
#define SADB_EXT_RESERVED 0
@@ -181,13 +181,13 @@ struct sadb_protocol {
#define SADB_EXT_PROPOSAL 13
#define SADB_EXT_SUPPORTED 14
#define SADB_EXT_SPIRANGE 15
-#define SADB_EXT_X_SRC_MASK 16
-#define SADB_EXT_X_DST_MASK 17
-#define SADB_EXT_X_PROTOCOL 18
-#define SADB_EXT_X_SA2 19
-#define SADB_EXT_X_SRC_FLOW 20
-#define SADB_EXT_X_DST_FLOW 21
-#define SADB_EXT_X_DST2 22
+#define SADB_X_EXT_SRC_MASK 16
+#define SADB_X_EXT_DST_MASK 17
+#define SADB_X_EXT_PROTOCOL 18
+#define SADB_X_EXT_SA2 19
+#define SADB_X_EXT_SRC_FLOW 20
+#define SADB_X_EXT_DST_FLOW 21
+#define SADB_X_EXT_DST2 22
#define SADB_EXT_MAX 22
/* Fix pfkeyv2.c struct pfkeyv2_socket if SATYPE_MAX > 31 */
@@ -198,9 +198,9 @@ struct sadb_protocol {
#define SADB_SATYPE_OSPFV2 4
#define SADB_SATYPE_RIPV2 5
#define SADB_SATYPE_MIP 6
-#define SADB_SATYPE_X_AH_OLD 7
-#define SADB_SATYPE_X_ESP_OLD 8
-#define SADB_SATYPE_X_IPIP 9
+#define SADB_X_SATYPE_AH_OLD 7
+#define SADB_X_SATYPE_ESP_OLD 8
+#define SADB_X_SATYPE_IPIP 9
#define SADB_SATYPE_MAX 9
#define SADB_SASTATE_LARVAL 0
@@ -214,25 +214,25 @@ struct sadb_protocol {
#define SADB_AALG_SHA1HMAC 2
#define SADB_AALG_MD5HMAC96 3
#define SADB_AALG_SHA1HMAC96 4
-#define SADB_AALG_X_RIPEMD160HMAC96 5
-#define SADB_AALG_X_MD5 6
-#define SADB_AALG_X_SHA1 7
+#define SADB_X_AALG_RIPEMD160HMAC96 5
+#define SADB_X_AALG_MD5 6
+#define SADB_X_AALG_SHA1 7
#define SADB_AALG_MAX 7
#define SADB_EALG_NONE 0
#define SADB_EALG_DESCBC 1
#define SADB_EALG_3DESCBC 2
-#define SADB_EALG_X_BLF 3
-#define SADB_EALG_X_CAST 4
-#define SADB_EALG_X_SKIPJACK 5
+#define SADB_X_EALG_BLF 3
+#define SADB_X_EALG_CAST 4
+#define SADB_X_EALG_SKIPJACK 5
#define SADB_EALG_MAX 5
#define SADB_SAFLAGS_PFS 0x01 /* perfect forward secrecy */
-#define SADB_SAFLAGS_X_HALFIV 0x02 /* Used for ESP-old */
-#define SADB_SAFLAGS_X_TUNNEL 0x04 /* Force tunneling */
-#define SADB_SAFLAGS_X_CHAINDEL 0x08 /* Delete whole SA chain */
-#define SADB_SAFLAGS_X_LOCALFLOW 0x10 /* Add flow with src=0.0.0.0 */
-#define SADB_SAFLAGS_X_REPLACEFLOW 0x20 /* Replace existing flow */
+#define SADB_X_SAFLAGS_HALFIV 0x02 /* Used for ESP-old */
+#define SADB_X_SAFLAGS_TUNNEL 0x04 /* Force tunneling */
+#define SADB_X_SAFLAGS_CHAINDEL 0x08 /* Delete whole SA chain */
+#define SADB_X_SAFLAGS_LOCALFLOW 0x10 /* Add flow with src=0.0.0.0 */
+#define SADB_X_SAFLAGS_REPLACEFLOW 0x20 /* Replace existing flow */
#define SADB_IDENTTYPE_RESERVED 0
#define SADB_IDENTTYPE_PREFIX 1
diff --git a/sys/net/pfkeyv2_parsemessage.c b/sys/net/pfkeyv2_parsemessage.c
index 46b83dedadf..568e2b0c1ef 100644
--- a/sys/net/pfkeyv2_parsemessage.c
+++ b/sys/net/pfkeyv2_parsemessage.c
@@ -49,13 +49,13 @@ you didn't get a copy, you may request one from <license@inner.net>.
#define BITMAP_KEY (BITMAP_KEY_AUTH | BITMAP_KEY_ENCRYPT)
#define BITMAP_IDENTITY (BITMAP_IDENTITY_SRC | BITMAP_IDENTITY_DST)
#define BITMAP_MSG 1
-#define BITMAP_X_SRC_MASK (1 << SADB_EXT_X_SRC_MASK)
-#define BITMAP_X_DST_MASK (1 << SADB_EXT_X_DST_MASK)
-#define BITMAP_X_PROTOCOL (1 << SADB_EXT_X_PROTOCOL)
-#define BITMAP_X_SA2 (1 << SADB_EXT_X_SA2)
-#define BITMAP_X_SRC_FLOW (1 << SADB_EXT_X_SRC_FLOW)
-#define BITMAP_X_DST_FLOW (1 << SADB_EXT_X_DST_FLOW)
-#define BITMAP_X_DST2 (1 << SADB_EXT_X_DST2)
+#define BITMAP_X_SRC_MASK (1 << SADB_X_EXT_SRC_MASK)
+#define BITMAP_X_DST_MASK (1 << SADB_X_EXT_DST_MASK)
+#define BITMAP_X_PROTOCOL (1 << SADB_X_EXT_PROTOCOL)
+#define BITMAP_X_SA2 (1 << SADB_X_EXT_SA2)
+#define BITMAP_X_SRC_FLOW (1 << SADB_X_EXT_SRC_FLOW)
+#define BITMAP_X_DST_FLOW (1 << SADB_X_EXT_DST_FLOW)
+#define BITMAP_X_DST2 (1 << SADB_X_EXT_DST2)
uint32_t sadb_exts_allowed_in[SADB_MAX+1] =
{
@@ -274,7 +274,7 @@ pfkeyv2_parsemessage(void *p, int len, void **headers)
seen |= (1 << sadb_ext->sadb_ext_type);
switch (sadb_ext->sadb_ext_type) {
- case SADB_EXT_X_SA2:
+ case SADB_X_EXT_SA2:
case SADB_EXT_SA:
{
struct sadb_sa *sadb_sa = (struct sadb_sa *)p;
@@ -298,7 +298,7 @@ pfkeyv2_parsemessage(void *p, int len, void **headers)
return EINVAL;
}
break;
- case SADB_EXT_X_PROTOCOL:
+ case SADB_X_EXT_PROTOCOL:
if (i != sizeof(struct sadb_protocol))
return EINVAL;
break;
@@ -312,11 +312,11 @@ pfkeyv2_parsemessage(void *p, int len, void **headers)
break;
case SADB_EXT_ADDRESS_SRC:
case SADB_EXT_ADDRESS_DST:
- case SADB_EXT_X_DST2:
- case SADB_EXT_X_SRC_MASK:
- case SADB_EXT_X_DST_MASK:
- case SADB_EXT_X_SRC_FLOW:
- case SADB_EXT_X_DST_FLOW:
+ case SADB_X_EXT_DST2:
+ case SADB_X_EXT_SRC_MASK:
+ case SADB_X_EXT_DST_MASK:
+ case SADB_X_EXT_SRC_FLOW:
+ case SADB_X_EXT_DST_FLOW:
case SADB_EXT_ADDRESS_PROXY:
{
struct sadb_address *sadb_address = (struct sadb_address *)p;
@@ -346,10 +346,10 @@ pfkeyv2_parsemessage(void *p, int len, void **headers)
/* Only check the right pieces */
switch (sadb_ext->sadb_ext_type)
{
- case SADB_EXT_X_SRC_MASK:
- case SADB_EXT_X_DST_MASK:
- case SADB_EXT_X_SRC_FLOW:
- case SADB_EXT_X_DST_FLOW:
+ case SADB_X_EXT_SRC_MASK:
+ case SADB_X_EXT_DST_MASK:
+ case SADB_X_EXT_SRC_FLOW:
+ case SADB_X_EXT_DST_FLOW:
break;
default:
diff --git a/sys/netinet/ip_xform.c b/sys/netinet/ip_xform.c
index c4c382261f1..69edca5a8c2 100644
--- a/sys/netinet/ip_xform.c
+++ b/sys/netinet/ip_xform.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_xform.c,v 1.2 1999/06/30 17:23:59 deraadt Exp $ */
+/* $OpenBSD: ip_xform.c,v 1.3 1999/07/02 23:37:33 deraadt Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -198,7 +198,7 @@ blf_zerokey(u_int8_t **sched)
}
struct enc_xform enc_xform_blf = {
- SADB_EALG_X_BLF, "Blowfish",
+ SADB_X_EALG_BLF, "Blowfish",
ESP_BLF_BLKS, ESP_BLF_IVS,
5, BLF_MAXKEYLEN, 8,
blf_encrypt,
@@ -236,7 +236,7 @@ cast5_zerokey(u_int8_t **sched)
}
struct enc_xform enc_xform_cast5 = {
- SADB_EALG_X_CAST, "CAST",
+ SADB_X_EALG_CAST, "CAST",
ESP_CAST_BLKS, ESP_CAST_IVS,
5, 16, 8,
cast5_encrypt,
@@ -282,7 +282,7 @@ skipjack_zerokey(u_int8_t **sched)
}
struct enc_xform enc_xform_skipjack = {
- SADB_EALG_X_SKIPJACK, "Skipjack",
+ SADB_X_EALG_SKIPJACK, "Skipjack",
ESP_SKIPJACK_BLKS, ESP_SKIPJACK_IVS,
10, 10, 8,
skipjack_encrypt,
@@ -314,7 +314,7 @@ struct auth_hash auth_hash_hmac_sha1_96 = {
};
struct auth_hash auth_hash_hmac_ripemd_160_96 = {
- SADB_AALG_X_RIPEMD160HMAC96, "HMAC-RIPEMD-160-96",
+ SADB_X_AALG_RIPEMD160HMAC96, "HMAC-RIPEMD-160-96",
RIPEMD160HMAC96_KEYSIZE, AH_RMD160_ALEN,
sizeof(RMD160_CTX),
(void (*)(void *)) RMD160Init,
@@ -323,7 +323,7 @@ struct auth_hash auth_hash_hmac_ripemd_160_96 = {
};
struct auth_hash auth_hash_key_md5 = {
- SADB_AALG_X_MD5, "Keyed MD5",
+ SADB_X_AALG_MD5, "Keyed MD5",
0, AH_MD5_ALEN,
sizeof(MD5_CTX),
(void (*)(void *))MD5Init,
@@ -332,7 +332,7 @@ struct auth_hash auth_hash_key_md5 = {
};
struct auth_hash auth_hash_key_sha1 = {
- SADB_AALG_X_SHA1, "Keyed SHA1",
+ SADB_X_AALG_SHA1, "Keyed SHA1",
0, AH_SHA1_ALEN,
sizeof(SHA1_CTX),
(void (*)(void *))SHA1Init,