/*
- * Copyright (c) 2008 Apple Inc. All rights reserved.
+ * Copyright (c) 2008-2011 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* virtual interface, and control MTU/MSS by the interface MTU.
*/
size_t
-ah_hdrsiz(isr)
- struct ipsecrequest *isr;
+ah_hdrsiz(struct ipsecrequest *isr)
{
/* sanity check */
* the function does not modify m.
*/
int
-ah4_output(m, sav)
- struct mbuf *m;
- struct secasvar *sav;
+ah4_output(struct mbuf *m, struct secasvar *sav)
{
const struct ah_algorithm *algo;
u_int32_t spi;
if (sav->flags & SADB_X_EXT_OLD) {
struct ah *ahdr;
- ahdr = (struct ah *)ahdrpos;
+ ahdr = (struct ah *)(void *)ahdrpos;
ahsumpos = (u_char *)(ahdr + 1);
ahdr->ah_len = plen >> 2;
ahdr->ah_nxt = ip->ip_p;
} else {
struct newah *ahdr;
- ahdr = (struct newah *)ahdrpos;
+ ahdr = (struct newah *)(void *)ahdrpos;
ahsumpos = (u_char *)(ahdr + 1);
ahdr->ah_len = (plen >> 2) + 1; /* plus one for seq# */
ahdr->ah_nxt = ip->ip_p;
/* Calculate AH length */
int
-ah_hdrlen(sav)
- struct secasvar *sav;
+ah_hdrlen(struct secasvar *sav)
{
const struct ah_algorithm *algo;
int plen, ahlen;
* Fill in the Authentication Header and calculate checksum.
*/
int
-ah6_output(m, nexthdrp, md, sav)
- struct mbuf *m;
- u_char *nexthdrp;
- struct mbuf *md;
- struct secasvar *sav;
+ah6_output(struct mbuf *m, u_char *nexthdrp, struct mbuf *md,
+ struct secasvar *sav)
{
struct mbuf *mprev;
struct mbuf *mah;
* The mbuf must be pulled up toward, at least, ip option part.
*/
static struct in_addr *
-ah4_finaldst(m)
- struct mbuf *m;
+ah4_finaldst(struct mbuf *m)
{
struct ip *ip;
int optlen;
return NULL;
}
i += q[i + IPOPT_OLEN] - sizeof(struct in_addr);
- return (struct in_addr *)(q + i);
+ return (struct in_addr *)(void *)(q + i);
default:
if (q[i + IPOPT_OLEN] < 2 ||
optlen - i < q[i + IPOPT_OLEN]) {