Lines Matching refs:cx

291     pub(crate) fn process(&mut self, cx: &mut Context, ip_repr: &IpRepr, payload: &[u8]) {  in process()
306 ip_repr.emit(&mut buf[..header_len], &cx.checksum_caps()); in process()
320 pub(crate) fn dispatch<F, E>(&mut self, cx: &mut Context, emit: F) -> Result<(), E> in dispatch()
326 let _checksum_caps = &cx.checksum_caps(); in dispatch()
359 emit(cx, (IpRepr::Ipv4(ipv4_repr), packet.payload())) in dispatch()
384 emit(cx, (IpRepr::Ipv6(ipv6_repr), packet.payload())) in dispatch()
511 let mut cx = Context::mock(); localVariable
515 socket.dispatch(&mut cx, |_, _| unreachable!()),
524 socket.dispatch(&mut cx, |_, (ip_repr, ip_payload)| {
534 socket.dispatch(&mut cx, |_, (ip_repr, ip_payload)| {
547 let mut cx = Context::mock(); localVariable
550 socket.process(&mut cx, &$hdr, &$payload);
560 let mut cx = Context::mock(); localVariable
566 socket.process(&mut cx, &$hdr, &buffer);
572 let mut cx = Context::mock(); localVariable
575 socket.process(&mut cx, &$hdr, &$payload);
612 let mut cx = Context::mock(); in test_send_illegal() localVariable
619 socket.dispatch(&mut cx, |_, _| unreachable!()), in test_send_illegal()
628 socket.dispatch(&mut cx, |_, _| unreachable!()), in test_send_illegal()
635 let mut cx = Context::mock(); in test_send_illegal() localVariable
642 socket.dispatch(&mut cx, |_, _| unreachable!()), in test_send_illegal()
651 socket.dispatch(&mut cx, |_, _| unreachable!()), in test_send_illegal()
663 let mut cx = Context::mock(); in test_recv_process() localVariable
671 &mut cx, in test_recv_process()
679 &mut cx, in test_recv_process()
690 let mut cx = Context::mock(); in test_recv_process() localVariable
695 &mut cx, in test_recv_process()
703 &mut cx, in test_recv_process()
717 let mut cx = Context::mock(); in test_peek_process() localVariable
725 &mut cx, in test_peek_process()
732 &mut cx, in test_peek_process()
743 let mut cx = Context::mock(); in test_peek_process() localVariable
748 &mut cx, in test_peek_process()
755 &mut cx, in test_peek_process()