Lines Matching refs:gtp0

263 static bool gtp0_validate_echo_hdr(struct gtp0_header *gtp0)  in gtp0_validate_echo_hdr()  argument
265 return !(gtp0->tid || (gtp0->flags ^ 0x1e) || in gtp0_validate_echo_hdr()
266 gtp0->number != 0xff || gtp0->flow); in gtp0_validate_echo_hdr()
298 struct gtp0_header *gtp0; in gtp0_send_echo_resp() local
304 gtp0 = (struct gtp0_header *)(skb->data + sizeof(struct udphdr)); in gtp0_send_echo_resp()
306 if (!gtp0_validate_echo_hdr(gtp0)) in gtp0_send_echo_resp()
309 seq = gtp0->seq; in gtp0_send_echo_resp()
377 struct gtp0_header *gtp0; in gtp0_handle_echo_resp() local
383 gtp0 = (struct gtp0_header *)(skb->data + sizeof(struct udphdr)); in gtp0_handle_echo_resp()
385 if (!gtp0_validate_echo_hdr(gtp0)) in gtp0_handle_echo_resp()
412 struct gtp0_header *gtp0; in gtp0_udp_encap_recv() local
418 gtp0 = (struct gtp0_header *)(skb->data + sizeof(struct udphdr)); in gtp0_udp_encap_recv()
420 if ((gtp0->flags >> 5) != GTP_V0) in gtp0_udp_encap_recv()
427 if (gtp0->type == GTP_ECHO_REQ && gtp->sk_created) in gtp0_udp_encap_recv()
430 if (gtp0->type == GTP_ECHO_RSP && gtp->sk_created) in gtp0_udp_encap_recv()
433 if (gtp0->type != GTP_TPDU) in gtp0_udp_encap_recv()
436 pctx = gtp0_pdp_find(gtp, be64_to_cpu(gtp0->tid)); in gtp0_udp_encap_recv()
738 struct gtp0_header *gtp0; in gtp0_push_header() local
740 gtp0 = skb_push(skb, sizeof(*gtp0)); in gtp0_push_header()
742 gtp0->flags = 0x1e; /* v0, GTP-non-prime. */ in gtp0_push_header()
743 gtp0->type = GTP_TPDU; in gtp0_push_header()
744 gtp0->length = htons(payload_len); in gtp0_push_header()
745 gtp0->seq = htons((atomic_inc_return(&pctx->tx_seq) - 1) % 0xffff); in gtp0_push_header()
746 gtp0->flow = htons(pctx->u.v0.flow); in gtp0_push_header()
747 gtp0->number = 0xff; in gtp0_push_header()
748 gtp0->spare[0] = gtp0->spare[1] = gtp0->spare[2] = 0xff; in gtp0_push_header()
749 gtp0->tid = cpu_to_be64(pctx->u.v0.tid); in gtp0_push_header()