Lines Matching refs:ah

106 #include <netinet6/ah.h>
133 struct ah *ah;
160 ah = (struct ah *)(void *)(((caddr_t)ip) + off);
166 IP6_EXTHDR_GET(ah, struct ah *, m, off, sizeof(struct newah));
167 if (ah == NULL) {
174 nxt = ah->ah_nxt;
182 spi = ah->ah_spi;
253 if ((ah->ah_len << 2) - sizoff != siz1) {
256 (ah->ah_len << 2) - sizoff, (u_int32_t)siz1,
263 if (m->m_len < off + sizeof(struct ah) + sizoff + siz1) {
264 m = m_pullup(m, off + sizeof(struct ah) + sizoff + siz1);
274 ah = (struct ah *)(void *)(((caddr_t)ip) + off);
277 IP6_EXTHDR_GET(ah, struct ah *, m, off,
278 sizeof(struct ah) + sizoff + siz1);
279 if (ah == NULL) {
291 if (ipsec_chkreplay(ntohl(((struct newah *)ah)->ah_seq), sav))
337 sumpos = (caddr_t)(ah + 1);
340 sumpos = (caddr_t)(((struct newah *)ah) + 1);
363 if (ah->ah_nxt == IPPROTO_IPIP || ah->ah_nxt == IPPROTO_IP) {
369 if (m->m_len < off + sizeof(struct ah) + sizoff + siz1 + hlen) {
370 m = m_pullup(m, off + sizeof(struct ah)
380 nip = (struct ip *)((u_char *)(ah + 1) + sizoff + siz1);
388 else if (ah->ah_nxt == IPPROTO_IPV6) {
414 if (ipsec_updatereplay(ntohl(((struct newah *)ah)->ah_seq), sav)) {
423 stripsiz = sizeof(struct ah) + siz1;
627 struct ah *ah;
639 IP6_EXTHDR_CHECK(m, off, sizeof(struct ah), {return IPPROTO_DONE;});
640 ah = (struct ah *)(void *)(mtod(m, caddr_t) + off);
642 IP6_EXTHDR_GET(ah, struct ah *, m, off, sizeof(struct newah));
643 if (ah == NULL) {
653 nxt = ah->ah_nxt;
656 spi = ah->ah_spi;
717 if ((ah->ah_len << 2) - sizoff != siz1) {
720 (ah->ah_len << 2) - sizoff, (u_int32_t)siz1,
726 IP6_EXTHDR_CHECK(m, off, sizeof(struct ah) + sizoff + siz1,
729 IP6_EXTHDR_GET(ah, struct ah *, m, off,
730 sizeof(struct ah) + sizoff + siz1);
731 if (ah == NULL) {
744 if (ipsec_chkreplay(ntohl(((struct newah *)ah)->ah_seq), sav))
780 sumpos = (caddr_t)(ah + 1);
783 sumpos = (caddr_t)(((struct newah *)ah) + 1);
806 if (ah->ah_nxt == IPPROTO_IPV6) {
812 IP6_EXTHDR_CHECK(m, off, sizeof(struct ah) + sizoff + siz1
816 nip6 = (struct ip6_hdr *)((u_char *)(ah + 1) + sizoff + siz1);
822 } else if (ah->ah_nxt == IPPROTO_IPIP) {
825 } else if (ah->ah_nxt == IPPROTO_IP) {
850 if (ipsec_updatereplay(ntohl(((struct newah *)ah)->ah_seq), sav)) {
859 stripsiz = sizeof(struct ah) + siz1;
1031 struct newah ah;
1063 if (m->m_pkthdr.len < off + sizeof(ah))
1066 if (m->m_len < off + sizeof(ah)) {
1071 m_copydata(m, off, sizeof(ah), (caddr_t)&ah);
1072 ahp = &ah;