ah
return (ah);
ah = malloc(sizeof(*ah));
return (ah);
struct atexit_handler *ah;
ah = atexit_handler_alloc(dso);
if (ah == NULL) {
ah->ah_cxa_atexit = func;
ah->ah_arg = arg;
ah->ah_dso = dso;
ah->ah_next = atexit_handler_stack;
atexit_handler_stack = ah;
struct atexit_handler *ah, *dead_handlers = NULL, **prevp;
for (prevp = &atexit_handler_stack; (ah = (*prevp)) != NULL;) {
if (dso == NULL || dso == ah->ah_dso || ah->ah_atexit == NULL) {
if (ah->ah_atexit != NULL) {
if (ah->ah_dso != NULL) {
cxa_func = ah->ah_cxa_atexit;
ah->ah_cxa_atexit = NULL;
(*cxa_func)(ah->ah_arg);
atexit_func = ah->ah_atexit;
ah->ah_atexit = NULL;
*prevp = ah->ah_next;
if (STATIC_HANDLER_P(ah))
ah->ah_next = NULL;
ah->ah_next = dead_handlers;
dead_handlers = ah;
prevp = &ah->ah_next;
prevp = &ah->ah_next;
while ((ah = dead_handlers) != NULL) {
dead_handlers = ah->ah_next;
free(ah);
#define STATIC_HANDLER_P(ah) \
(ah >= &atexit_handler0[0] && ah < &atexit_handler0[NSTATIC_HANDLERS])
struct atexit_handler *ah;
ah = &atexit_handler0[i];
if (ah->ah_atexit == NULL && ah->ah_next == NULL) {
struct acpi_intrhandler *ah;
TAILQ_FOREACH(ah, &ai->ai_handlers, ah_list) {
rv += ah->ah_fn(ah->ah_arg);
struct acpi_intrhandler *ah;
ah = kmem_zalloc(sizeof(*ah), KM_SLEEP);
ah->ah_fn = handler;
ah->ah_arg = arg;
TAILQ_INSERT_TAIL(&ai->ai_handlers, ah, ah_list);
struct acpi_intrhandler *ah;
ah = TAILQ_FIRST(&ai->ai_handlers);
kmem_free(ah, sizeof(*ah));
struct exec ah;
if (N_GETMAGIC(x->ah) == OMAGIC)
*addr += sizeof(x->ah);
(void)ath_hal_settkipmic(ah, AH_FALSE);
(void)ath_hal_settkipmic(ah, AH_TRUE);
struct ath_hal *ah = sc->sc_ah;
if (!ath_hal_reset(ah, ic->ic_opmode, &sc->sc_curchan, AH_FALSE, &status)) {
ath_hal_intrset(ah, sc->sc_imask);
struct ath_hal *ah = sc->sc_ah;
ath_hal_gpioset(ah, sc->sc_ledpin,
ath_hal_intrset(ah, 0);
ath_hal_phydisable(ah);
struct ath_hal *ah = sc->sc_ah;
sc->sc_diversity != ath_hal_getdiversity(ah)) {
sc->sc_diversity = ath_hal_getdiversity(ah);
struct ath_hal *ah = sc->sc_ah;
ath_hal_intrset(ah, 0); /* disable interrupts */
if (!ath_hal_reset(ah, ic->ic_opmode, &sc->sc_curchan, AH_TRUE, &status))
ath_hal_intrset(ah, sc->sc_imask);
struct ath_hal *ah = sc->sc_ah;
tsf = ath_hal_gettsf64(ah);
struct ath_hal *ah = sc->sc_ah;
if (!ath_hal_keyset(ah, ATH_KEY(k->wk_keyix), hk,
return ath_hal_keyset(ah, ATH_KEY(k->wk_keyix+32),
return ath_hal_keyset(ah, ATH_KEY(k->wk_keyix), hk, mac);
return ath_hal_keyset(ah, ATH_KEY(k->wk_keyix), hk, mac);
return ath_hal_keyset(ah, k->wk_keyix, hk, mac);
struct ath_hal *ah = sc->sc_ah;
return ath_hal_keyset(ah, ATH_KEY(k->wk_keyix), &hk, mac);
struct ath_hal *ah = sc->sc_ah;
ath_hal_keyreset(ah, keyix);
ath_hal_keyreset(ah, keyix+32); /* RX key */
struct ath_hal *ah = sc->sc_ah;
rfilt = (ath_hal_getrxfilter(ah) & HAL_RX_FILTER_PHYERR)
struct ath_hal *ah = sc->sc_ah;
ath_hal_setrxfilter(ah, rfilt);
ath_hal_setopmode(ah);
ath_hal_setmac(ah, ic->ic_myaddr);
ath_hal_setmcastfilter(ah, mfilt[0], mfilt[1]);
struct ath_hal *ah = sc->sc_ah;
ath_hal_setslottime(ah, HAL_SLOT_TIME_9);
ath_hal_setslottime(ah, HAL_SLOT_TIME_20);
ath_beaconq_setup(struct ath_hal *ah)
return ath_hal_setuptxqueue(ah, HAL_TX_QUEUE_BEACON, &qi);
struct ath_hal *ah = sc->sc_ah;
ath_hal_gettxqueueprops(ah, sc->sc_bhalq, &qi);
if (!ath_hal_settxqueueprops(ah, sc->sc_bhalq, &qi)) {
ath_hal_resettxqueue(ah, sc->sc_bhalq); /* push to h/w */
struct ath_hal *ah = sc->sc_ah;
ath_hal_setuptxdesc(ah, ds
ath_hal_filltxdesc(ah, ds
struct ath_hal *ah = sc->sc_ah;
if (ath_hal_numtxpending(ah, sc->sc_bhalq) != 0) {
ncabq = ath_hal_numtxpending(ah, sc->sc_cabq->axq_qnum);
if (!ath_hal_stoptxdma(ah, sc->sc_bhalq)) {
ath_hal_txstart(ah, sc->sc_cabq->axq_qnum);
ath_hal_puttxbuf(ah, sc->sc_bhalq, bf->bf_daddr);
ath_hal_txstart(ah, sc->sc_bhalq);
struct ath_hal *ah = sc->sc_ah;
tsf = ath_hal_gettsf64(ah);
ath_hal_intrset(ah, 0);
ath_hal_beacontimers(ah, &bs);
ath_hal_intrset(ah, sc->sc_imask);
ath_hal_intrset(ah, 0);
tsf = ath_hal_gettsf64(ah);
ath_hal_beaconinit(ah, nexttbtt, intval);
ath_hal_intrset(ah, sc->sc_imask);
struct ath_hal *ah = NULL;
struct ath_hal *ah = sc->sc_ah;
ath_hal_setuprxdesc(ah, ds
ah = ath_hal_attach(devid, sc, sc->sc_st, sc->sc_sh, &status);
if (ah == NULL) {
if (ah->ah_abi != HAL_ABI_VERSION) {
struct ath_hal *ah = sc->sc_ah;
ath_hal_setdefantenna(ah, antenna);
ah->ah_abi, HAL_ABI_VERSION);
struct ath_hal *ah = sc->sc_ah;
nf = ath_hal_getchannoise(ah, &sc->sc_curchan);
tsf = ath_hal_gettsf64(ah);
sc->sc_ah = ah;
status = ath_hal_rxprocdesc(ah, ds,
sc->sc_mrretry = ath_hal_setupxtxdesc(ah, NULL, 0,0, 0,0, 0,0);
if (ath_hal_hwphycounters(ah))
ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan);
if (ath_hal_radar_event(ah))
sc->sc_keymax = ath_hal_keycachesize(ah);
struct ath_hal *ah = sc->sc_ah;
qnum = ath_hal_setuptxqueue(ah, qtype, &qi);
ath_hal_releasetxqueue(ah, qnum);
struct ath_hal *ah = sc->sc_ah;
ath_hal_keyreset(ah, i);
ath_hal_gettxqueueprops(ah, txq->axq_qnum, &qi);
if (!ath_hal_settxqueueprops(ah, txq->axq_qnum, &qi)) {
ath_hal_resettxqueue(ah, txq->axq_qnum); /* push to h/w */
struct ath_hal *ah = sc->sc_ah;
dur += ath_hal_computetxtime(ah, rt,
ctsduration += ath_hal_computetxtime(ah,
ctsduration += ath_hal_computetxtime(ah,
u_int64_t tsf = ath_hal_gettsf64(ah);
ath_hal_setuptxdesc(ah, ds
ath_hal_filltxdesc(ah, ds
ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr);
sc->sc_bhalq = ath_beaconq_setup(ah);
ath_hal_txstart(ah, txq->axq_qnum);
struct ath_hal *ah = sc->sc_ah;
status = ath_hal_txprocdesc(ah, ds, &ds->ds_txstat);
txqactive(struct ath_hal *ah, int qnum)
ath_hal_gettxintrtxqs(ah, &txqs);
struct ath_hal *ah = sc->sc_ah;
ath_hal_txprocdesc(ah, bf->bf_desc,
struct ath_hal *ah = sc->sc_ah;
(void) ath_hal_stoptxdma(ah, txq->axq_qnum);
(void *)(uintptr_t) ath_hal_gettxbuf(ah, txq->axq_qnum),
struct ath_hal *ah = sc->sc_ah;
(void) ath_hal_stoptxdma(ah, sc->sc_bhalq);
(void *)(uintptr_t) ath_hal_gettxbuf(ah, sc->sc_bhalq));
struct ath_hal *ah = sc->sc_ah;
ath_hal_stoppcurecv(ah); /* disable PCU */
ath_hal_setrxfilter(ah, 0); /* clear recv filter */
ath_hal_stopdmarecv(ah); /* disable DMA engine */
(void *)(uintptr_t) ath_hal_getrxbuf(ah), sc->sc_rxlink);
HAL_STATUS status = ath_hal_rxprocdesc(ah, ds,
struct ath_hal *ah = sc->sc_ah;
ath_hal_putrxbuf(ah, bf->bf_daddr);
ath_hal_rxena(ah); /* enable recv descriptors */
ath_hal_startpcurecv(ah); /* re-enable PCU/DMA engine */
struct ath_hal *ah = sc->sc_ah;
ath_hal_radar_wait(ah, &hchan);
struct ath_hal *ah = sc->sc_ah;
ath_hal_mhz2ieee(ah, sc->sc_curchan.channel,
ath_hal_mhz2ieee(ah, hchan.channel, hchan.channelFlags),
ath_hal_intrset(ah, 0); /* disable interrupts */
if (!ath_hal_reset(ah, ic->ic_opmode, &hchan, AH_TRUE, &status)) {
ath_hal_intrset(ah, sc->sc_imask);
struct ath_hal *ah = sc->sc_ah;
if (ath_hal_getrfgain(ah) == HAL_RFGAIN_NEED_CHANGE) {
if (!ath_hal_calibrate(ah, &sc->sc_curchan, &iqCalDone)) {
ath_hal_process_noisefloor(ah);
struct ath_hal *ah = sc->sc_ah;
ath_hal_setledstate(ah, leds[nstate]); /* set LED */
ath_hal_intrset(ah, sc->sc_imask &~ HAL_INT_GLOBAL);
ath_hal_setrxfilter(ah, rfilt);
ath_hal_setassocid(ah, bssid, ni->ni_associd);
ath_hal_setassocid(ah, bssid, 0);
if (ath_hal_keyisvalid(ah, i))
ath_hal_keysetmac(ah, i, bssid);
ath_hal_stoptxdma(ah, sc->sc_bhalq);
ath_hal_process_noisefloor(ah);
ath_hal_intrset(ah,
ath_hal_gpioCfgOutput(ah, sc->sc_ledpin,
ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon);
struct ath_hal *ah = sc->sc_ah;
if (!ath_hal_init_channels(ah, chans, IEEE80211_CHAN_MAX, &nchan,
(void)ath_hal_getregdomain(ah, &rd);
ix = ath_hal_mhz2ieee(ah, c->channel, c->channelFlags);
struct ath_hal *ah = sc->sc_ah;
ath_hal_settxpowlimit(ah, ic->ic_txpowlimit);
(void)ath_hal_gettxpowlimit(ah, &txpow);
struct ath_hal *ah = sc->sc_ah;
rt = ath_hal_getratetable(ah, HAL_MODE_11A);
rt = ath_hal_getratetable(ah, HAL_MODE_11B);
rt = ath_hal_getratetable(ah, HAL_MODE_11G);
rt = ath_hal_getratetable(ah, HAL_MODE_TURBO);
rt = ath_hal_getratetable(ah, HAL_MODE_108G);
if (ath_hal_ciphersupported(ah, HAL_CIPHER_WEP))
if (ath_hal_ciphersupported(ah, HAL_CIPHER_AES_OCB))
if (ath_hal_ciphersupported(ah, HAL_CIPHER_AES_CCM))
if (ath_hal_ciphersupported(ah, HAL_CIPHER_CKIP))
struct ath_hal *ah = sc->sc_ah;
if (ath_hal_ciphersupported(ah, HAL_CIPHER_TKIP)) {
if (ath_hal_getdiagstate(ah, id, indata, insize, &outdata, &outsize)) {
if (ath_hal_ciphersupported(ah, HAL_CIPHER_MIC))
if (ath_hal_hastkipsplit(ah) ||
!ath_hal_settkipsplit(ah, AH_FALSE))
struct ath_hal *ah = sc->sc_ah;
ah->ah_macVersion, ah->ah_macRev,
ah->ah_phyRev >> 4, ah->ah_phyRev & 0xf);
ath_hal_getcountrycode(ah, &cc);
modes = ath_hal_getwirelessmodes(ah, cc);
if (ah->ah_analog5GhzRev && ah->ah_analog2GhzRev)
ah->ah_analog5GhzRev >> 4,
ah->ah_analog5GhzRev & 0xf,
ah->ah_analog2GhzRev >> 4,
ah->ah_analog2GhzRev & 0xf);
printf(" radio %d.%d", ah->ah_analog5GhzRev >> 4,
ah->ah_analog5GhzRev & 0xf);
printf(" radio %d.%d", ah->ah_analog5GhzRev >> 4,
ah->ah_analog5GhzRev & 0xf);
if (ath_hal_haswmetkipmic(ah))
sc->sc_hasclrkey = ath_hal_ciphersupported(ah, HAL_CIPHER_CLR);
sc->sc_mcastkey = ath_hal_getmcastkeysearch(ah);
if (ath_hal_hastpc(ah) || ath_hal_hastxpowlimit(ah))
if (ath_hal_hasbursting(ah))
sc->sc_defant = ath_hal_getdefantenna(ah);
sc->sc_hasveol = ath_hal_hasveol(ah);
ath_hal_getmac(ah, ic->ic_myaddr);
if (ah)
ath_hal_detach(ah);
struct ath_hal *ah = sc->sc_ah;
ath_hal_setpower(ah, HAL_PM_AWAKE);
ath_hal_reset(ah, ic->ic_opmode, &sc->sc_curchan, HAL_M_IBSS, &status);
ath_hal_keyreset(ah, i);
ath_hal_resettxqueue(ah, sc->sc_bhalq);
ath_hal_resettxqueue(ah, i);
struct ath_hal *ah = sc->sc_ah;
if (!ath_hal_intrpend(ah)) /* shared irq, not for us */
ath_hal_getisr(ah, &status); /* clear ISR */
ath_hal_intrset(ah, 0); /* disable further intr's */
ath_hal_getisr(ah, &status); /* NB: clears ISR too */
ath_hal_intrset(ah, 0); /* disable intr's until reset */
ath_hal_intrset(ah, 0); /* disable intr's until reset */
ath_hal_updatetxtriglevel(ah, AH_TRUE);
ath_hal_intrset(ah, 0);
ath_hal_mibevent(ah, &sc->sc_halstats);
ath_hal_intrset(ah, sc->sc_imask);
struct ath_hal *ah = sc->sc_ah;
if (ath_hal_procdfs(ah, &hchan)) {
struct ath_hal *ah = sc->sc_ah;
struct arc_header *ah;
ah = mtod(head, struct arc_header *);
ah->arc_shost = GETMEM(bah_ram_ptr + 0);
ah->arc_dhost = GETMEM(bah_ram_ptr + 1);
struct ether_arp *ah;
ah = &wbuf.data.arp;
ah->arp_hrd = htons(ARPHRD_ETHER);
ah->arp_pro = htons(ETHERTYPE_IP);
ah->arp_hln = sizeof(ah->arp_sha); /* hardware address length */
ah->arp_pln = sizeof(ah->arp_spa); /* protocol address length */
ah->arp_op = htons(ARPOP_REQUEST);
MACPY(d->myea, ah->arp_sha);
(void)memcpy(ah->arp_spa, &d->myip, sizeof(ah->arp_spa));
(void)memcpy(ah->arp_tpa, &addr, sizeof(ah->arp_tpa));
ah = &rbuf.data.arp;
inet_ntoa(addr), ether_sprintf(ah->arp_sha));
MACPY(ah->arp_sha, al->ea);
struct ether_arp *ah;
ah = (struct ether_arp *)pkt;
if (ah->arp_hrd != htons(ARPHRD_ETHER) ||
ah->arp_pro != htons(ETHERTYPE_IP) ||
ah->arp_hln != sizeof(ah->arp_sha) ||
ah->arp_pln != sizeof(ah->arp_spa) )
if (ah->arp_op == htons(ARPOP_REQUEST)) {
arp_reply(d, ah);
if (ah->arp_op != htons(ARPOP_REPLY)) {
ah->arp_spa, sizeof(ah->arp_spa)))
struct arphdr *ah = (void *)ip;
if (n < (ssize_t)(sizeof(*ah) + 2 * (ah->ar_hln + ah->ar_pln))) {
if (ah->ar_op == htons(ARPOP_REQUEST)) {
arp_reply(d, ah);
struct arc_header *ah;
ah = mtod(m, struct arc_header *);
ah->arc_type = atype;
ah->arc_dhost = adst;
ah->arc_shost = myself;
ah->arc_flag = rsflag;
ah->arc_seqid = ac->ac_seqid;
ah = mtod(m, struct arc_header *);
ah->arc_flag = 0xFF;
ah->arc_seqid = 0xFFFF;
ah->arc_type2 = atype;
ah->arc_flag2 = sflag;
ah->arc_seqid2 = ac->ac_seqid;
ah = mtod(m, struct arc_header *);
ah->arc_flag = sflag;
ah->arc_seqid = ac->ac_seqid;
ah->arc_dhost = adst;
ah->arc_shost = myself;
ah->arc_type = atype;
ah = mtod(m, struct arc_header *);
ah->arc_type = atype;
ah->arc_dhost = adst;
ah->arc_shost = myself;
struct arc_header *ah, *ah1;
ah = mtod(m, struct arc_header *);
typ = ah->arc_type;
src = ah->arc_shost;
dst = ah->arc_dhost;
if (ah->arc_flag == 0xff) {
ah = mtod(m, struct arc_header *);
if (ah->arc_flag & 1) {
af->af_maxflag = ah->arc_flag;
af->af_seqid = ah->arc_seqid;
if (ah->arc_flag == 0)
if (ah->arc_seqid != ah1->arc_seqid) {
if (ah->arc_flag == af->af_lastseen) {
if (ah->arc_flag == af->af_lastseen + 2) {
af->af_lastseen = ah->arc_flag;
struct arc_header *ah;
ah = mtod(m, struct arc_header *);
if (arcbroadcastaddr == ah->arc_dhost) {
atype = ah->arc_type;
struct arphdr *ah;
ah = mtod(m, struct arphdr *);
void *tha = ar_tha(ah);
ah->ar_hrd = htons(ARPHRD_ETHER);
switch (ntohs(ah->ar_op)) {
ah = mtod(m0, struct arphdr *);
ah->ar_hrd = htons(ARPHRD_IEEE1394);
struct arphdr *ah;
ar_sha(ah), ah->ar_hln);
memcpy(&la->ll_addr, ar_sha(ah), ifp->if_addrlen);
rt_clonedmsg(rt_cmd, NULL, sintosa(&sin), ar_sha(ah), ifp);
tha = ar_tha(ah);
memcpy(tha, ar_sha(ah), ah->ar_hln);
memcpy(ar_sha(ah), CLLADDR(ifp->if_sadl), ah->ar_hln);
tha = ar_tha(ah);
memcpy(tha, ar_sha(ah), ah->ar_hln);
memcpy(ar_sha(ah), &lle->ll_addr, ah->ar_hln);
memcpy(ar_tpa(ah), ar_spa(ah), ah->ar_pln);
memcpy(ar_spa(ah), &itaddr, ah->ar_pln);
ah->ar_op = htons(ARPOP_REPLY);
ah->ar_pro = htons(ETHERTYPE_IP); /* let's be sure! */
m->m_len = sizeof(*ah) + (2 * ah->ar_pln) + ah->ar_hln;
m->m_len = sizeof(*ah) + (2 * ah->ar_pln) + (2 * ah->ar_hln);
struct arphdr *ah;
ah = mtod(m, struct arphdr *);
op = ntohs(ah->ar_op);
tha = ar_tha(ah);
if (ah->ar_pln != sizeof(struct in_addr))
if (ah->ar_hln != rcvif->if_sadl->sdl_alen)
memcpy(&srv_ip, ar_spa(ah), sizeof(srv_ip));
memcpy(&myip, ar_tpa(ah), sizeof(myip));
struct arphdr *ah;
m->m_len = sizeof(*ah) + 2*sizeof(struct in_addr) +
ah = mtod(m, struct arphdr *);
memset(ah, 0, m->m_len);
ah->ar_pro = htons(ETHERTYPE_IP);
ah->ar_hln = ifp->if_addrlen; /* hardware address length */
ah->ar_pln = sizeof(struct in_addr); /* protocol address length */
ah->ar_op = htons(ARPOP_REVREQUEST);
memcpy(ar_sha(ah), CLLADDR(ifp->if_sadl), ah->ar_hln);
tha = ar_tha(ah);
memcpy(tha, CLLADDR(ifp->if_sadl), ah->ar_hln);
struct arphdr *ah;
m->m_len = sizeof(*ah) + 2 * sizeof(struct in_addr) +
m->m_len = sizeof(*ah) + 2 * sizeof(struct in_addr) +
ah = mtod(m, struct arphdr *);
memset(ah, 0, m->m_len);
ah->ar_hrd = htons(ARPHRD_IEEE1394);
ah->ar_pro = htons(ETHERTYPE_IP);
ah->ar_hln = ifp->if_addrlen; /* hardware address length */
ah->ar_pln = sizeof(struct in_addr); /* protocol address length */
ah->ar_op = htons(ARPOP_REQUEST);
memcpy(ar_sha(ah), saddr, ah->ar_hln);
memcpy(ar_tha(ah), taddr, ah->ar_hln);
memcpy(ar_spa(ah), sip, ah->ar_pln);
memcpy(ar_tpa(ah), tip, ah->ar_pln);
struct arphdr *ah;
ah = mtod(m, struct arphdr *);
op = ntohs(ah->ar_op);
if (ah->ar_pln != sizeof(struct in_addr))
ifp = if_get_bylla(ar_sha(ah), ah->ar_hln, &psref);
memcpy(&isaddr, ar_spa(ah), sizeof(isaddr));
memcpy(&itaddr, ar_tpa(ah), sizeof(itaddr));
if (ia->ia_ifp == rcvif && (ah->ar_hln >= 6) &&
carp_iamatch(ia, ar_sha(ah),
if (ah->ar_hln != ifp->if_addrlen) {
IN_PRINT(ipbuf, &isaddr), ah->ar_hln, ifp->if_addrlen);
if (!memcmp(ar_sha(ah), ifp->if_broadcastaddr, ifp->if_addrlen)) {
lla_snprintf(llabuf, sizeof(llabuf), ar_sha(ah),
ah->ar_hln));
if (mtag == NULL || (ah->ar_hln == ETHER_ADDR_LEN &&
memcmp(mtag + 1, ar_sha(ah), ah->ar_hln) == 0)) {
NULL, 0, ar_sha(ah), ah->ar_hln);
memcmp(ar_sha(ah), &la->ll_addr, ifp->if_addrlen))
ah = (struct ah *)((char *)ip + (ip->ip_hl << 2));
IPPROTO_AH, ah->ah_spi, 0, 0);
struct newah ah;
if (m->m_pkthdr.len < off + sizeof(ah))
if (m->m_len < off + sizeof(ah)) {
m_copydata(m, off, sizeof(ah), &ah);
ahp = &ah;
struct ah *ah;
key_getsizes_ah(const struct auth_hash *ah, int alg,
*ksmin = *ksmax = ah->keysize;
if (ah->keysize == 0) {
ah->ah_seq = htonl(sav->replay->count);
sizeof(struct ah) + sizeof(uint32_t) + ah_max_authsize;
size = sizeof(struct ah) + sizeof(uint32_t) + ah_max_authsize;
struct newah *ah;
M_REGION_GET(ah, struct newah *, m, skip, rplen);
if (ah == NULL) {
nxt = ah->ah_nxt;
if (sav->replay && !ipsec_chkreplay(ntohl(ah->ah_seq), sav)) {
hl = sizeof(struct ah) + (ah->ah_len * sizeof(uint32_t));
struct newah *ah;
sizeof(struct ah) : sizeof(struct ah) + sizeof(uint32_t))
ah = (struct newah *)(mtod(mi, char *) + roff);
m_copydata(m, protoff, sizeof(uint8_t), &ah->ah_nxt);
ah->ah_len = (ahsize - sizeof(struct ah)) / sizeof(uint32_t);
ah->ah_reserve = 0;
ah->ah_spi = sav->spi;