| 624 | } |
| 625 | |
| 626 | static void |
| 627 | gre_setseqn(struct grehdr *gh, uint32_t seq) |
| 628 | { |
| 629 | uint32_t *opts; |
| 630 | uint16_t flags; |
| 631 | |
| 632 | opts = gh->gre_opts; |
| 633 | flags = ntohs(gh->gre_flags); |
| 634 | KASSERT((flags & GRE_FLAGS_SP) != 0, |
| 635 | ("gre_setseqn called, but GRE_FLAGS_SP isn't set ")); |
| 636 | if (flags & GRE_FLAGS_CP) |
| 637 | opts++; |
| 638 | if (flags & GRE_FLAGS_KP) |
| 639 | opts++; |
| 640 | *opts = htonl(seq); |
| 641 | } |
| 642 | |
| 643 | static uint32_t |
| 644 | gre_flowid(struct gre_softc *sc, struct mbuf *m, uint32_t af) |