em->em_type = EMT_DELSPICHAIN;
else
em->em_type = EMT_DELSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = atoi(argv[4]); /* sanity checking in the kernel */
-/* $OpenBSD: ipsecadm.c,v 1.1 1997/03/01 15:08:24 provos Exp $ */
+/* $OpenBSD: ipsecadm.c,v 1.2 1997/04/14 10:04:27 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
ss[1] = s[1];
ss[2] = 0;
- return strtol(ss, NULL, 16);
+ return strtoul(ss, NULL, 16);
}
void
-/* $OpenBSD: xf_ahhmacmd5.c,v 1.1 1997/03/01 15:08:25 provos Exp $ */
+/* $OpenBSD: xf_ahhmacmd5.c,v 1.2 1997/04/14 10:04:28 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
em->em_msglen = EMT_SETSPI_FLEN + 4 + AHHMACMD5_KMAX;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_AHHMACMD5;
-/* $OpenBSD: xf_ahhmacsha1.c,v 1.1 1997/03/01 15:08:26 provos Exp $ */
+/* $OpenBSD: xf_ahhmacsha1.c,v 1.2 1997/04/14 10:04:29 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
em->em_msglen = EMT_SETSPI_FLEN + 4 + AHHMACSHA1_KMAX;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_AHHMACSHA1;
-/* $OpenBSD: xf_ahmd5.c,v 1.1 1997/03/01 15:08:26 provos Exp $ */
+/* $OpenBSD: xf_ahmd5.c,v 1.2 1997/04/14 10:04:29 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
em->em_msglen = EMT_SETSPI_FLEN + 4 + klen;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_AHMD5;
-/* $OpenBSD: xf_delspi.c,v 1.1 1997/03/01 15:08:27 provos Exp $ */
+/* $OpenBSD: xf_delspi.c,v 1.2 1997/04/14 10:04:30 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
em->em_type = EMT_DELSPICHAIN;
else
em->em_type = EMT_DELSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = atoi(argv[4]); /* sanity checking in the kernel */
-/* $OpenBSD: xf_esp3desmd5.c,v 1.1 1997/03/01 15:08:27 provos Exp $ */
+/* $OpenBSD: xf_esp3desmd5.c,v 1.2 1997/04/14 10:04:31 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
em->em_msglen = EMT_SETSPI_FLEN + ESP3DESMD5_ULENGTH;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_ESP3DESMD5;
-/* $OpenBSD: xf_espdes.c,v 1.1 1997/03/01 15:08:28 provos Exp $ */
+/* $OpenBSD: xf_espdes.c,v 1.2 1997/04/14 10:04:32 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
em->em_msglen = EMT_SETSPI_FLEN + ESP_ULENGTH;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_ESPDES;
-/* $OpenBSD: xf_espdesmd5.c,v 1.1 1997/03/01 15:08:28 provos Exp $ */
+/* $OpenBSD: xf_espdesmd5.c,v 1.2 1997/04/14 10:04:32 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
em->em_msglen = EMT_SETSPI_FLEN + ESPDESMD5_ULENGTH;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_ESPDESMD5;
-/* $OpenBSD: xf_grp.c,v 1.1 1997/03/01 15:08:28 provos Exp $ */
+/* $OpenBSD: xf_grp.c,v 1.2 1997/04/14 10:04:33 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
switch (nspis)
{
case 4:
- em->em_rel[3].emr_spi = htonl(strtol(argv[8], NULL, 16));
+ em->em_rel[3].emr_spi = htonl(strtoul(argv[8], NULL, 16));
em->em_rel[3].emr_dst.s_addr = inet_addr(argv[7]);
case 3:
- em->em_rel[2].emr_spi = htonl(strtol(argv[6], NULL, 16));
+ em->em_rel[2].emr_spi = htonl(strtoul(argv[6], NULL, 16));
em->em_rel[2].emr_dst.s_addr = inet_addr(argv[5]);
case 2:
- em->em_rel[1].emr_spi = htonl(strtol(argv[4], NULL, 16));
+ em->em_rel[1].emr_spi = htonl(strtoul(argv[4], NULL, 16));
em->em_rel[1].emr_dst.s_addr = inet_addr(argv[3]);
case 1:
- em->em_rel[0].emr_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_rel[0].emr_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_rel[0].emr_dst.s_addr = inet_addr(argv[1]);
break;
}
-/* $OpenBSD: xf_ip4.c,v 1.1 1997/03/01 15:08:29 provos Exp $ */
+/* $OpenBSD: xf_ip4.c,v 1.2 1997/04/14 10:04:34 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
* (except when noted otherwise).
em->em_msglen = EMT_SETSPI_FLEN + sizeof(struct ip4_xencap);
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_IP4;
gw->sen_type = SENT_IPSP;
gw->sen_ipsp_src.s_addr = inet_addr(argv[5]);
gw->sen_ipsp_dst.s_addr = inet_addr(argv[6]);
- gw->sen_ipsp_spi = htonl(strtol(argv[7], NULL, 16));
+ gw->sen_ipsp_spi = htonl(strtoul(argv[7], NULL, 16));
gw->sen_ipsp_ifn = atoi(argv[8]);
/*
gw->sen_type = SENT_IPSP;
gw->sen_ipsp_src.s_addr = inet_addr(argv[5]);
gw->sen_ipsp_dst.s_addr = inet_addr(argv[6]);
- gw->sen_ipsp_spi = htonl(strtol(argv[7], NULL, 16));
+ gw->sen_ipsp_spi = htonl(strtoul(argv[7], NULL, 16));
gw->sen_ipsp_ifn = atoi(argv[8]);
/*
ss[1] = s[1];
ss[2] = 0;
- return strtol(ss, NULL, 16);
+ return strtoul(ss, NULL, 16);
}
em->em_msglen = EMT_SETSPI_FLEN + 4 + klen;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_AHMD5;
ss[1] = s[1];
ss[2] = 0;
- return strtol(ss, NULL, 16);
+ return strtoul(ss, NULL, 16);
}
em->em_msglen = EMT_SETSPI_FLEN + 4 + AHHMACMD5_KMAX;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_AHHMACMD5;
ss[1] = s[1];
ss[2] = 0;
- return strtol(ss, NULL, 16);
+ return strtoul(ss, NULL, 16);
}
em->em_msglen = EMT_SETSPI_FLEN + ESP_ULENGTH;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_ESPDES;
ss[1] = s[1];
ss[2] = 0;
- return strtol(ss, NULL, 16);
+ return strtoul(ss, NULL, 16);
}
em->em_msglen = EMT_SETSPI_FLEN + ESP3DESMD5_ULENGTH;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_ESP3DESMD5;
ss[1] = s[1];
ss[2] = 0;
- return strtol(ss, NULL, 16);
+ return strtoul(ss, NULL, 16);
}
em->em_msglen = EMT_SETSPI_FLEN + ESPDESMD5_ULENGTH;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_ESPDESMD5;
switch (nspis)
{
case 4:
- em->em_rel[3].emr_spi = htonl(strtol(argv[8], NULL, 16));
+ em->em_rel[3].emr_spi = htonl(strtoul(argv[8], NULL, 16));
em->em_rel[3].emr_dst.s_addr = inet_addr(argv[7]);
case 3:
- em->em_rel[2].emr_spi = htonl(strtol(argv[6], NULL, 16));
+ em->em_rel[2].emr_spi = htonl(strtoul(argv[6], NULL, 16));
em->em_rel[2].emr_dst.s_addr = inet_addr(argv[5]);
case 2:
- em->em_rel[1].emr_spi = htonl(strtol(argv[4], NULL, 16));
+ em->em_rel[1].emr_spi = htonl(strtoul(argv[4], NULL, 16));
em->em_rel[1].emr_dst.s_addr = inet_addr(argv[3]);
case 1:
- em->em_rel[0].emr_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_rel[0].emr_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_rel[0].emr_dst.s_addr = inet_addr(argv[1]);
break;
}
ss[1] = s[1];
ss[2] = 0;
- return strtol(ss, NULL, 16);
+ return strtoul(ss, NULL, 16);
}
em->em_msglen = EMT_SETSPI_FLEN + 4 + AHHMACSHA1_KMAX;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_AHHMACSHA1;
em->em_msglen = EMT_SETSPI_FLEN + sizeof(struct ip4_xencap);
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_IP4;