moving lp packets in lp-data crate (#6810)

* moving lp packets in lp-data crate

* one more bit

* fmt

* crate description
This commit is contained in:
Simon Wicky
2026-05-20 14:32:01 +02:00
committed by GitHub
parent b3e37ce13c
commit 71d4b5b3ea
52 changed files with 668 additions and 389 deletions
@@ -9,8 +9,8 @@ mod tests {
use crate::node::lp::directory::LpNodeDetails;
use crate::node::lp::state::SharedLpNodeControlState;
use anyhow::Context;
use nym_lp::packet::version;
use nym_lp::peer::{LpLocalPeer, LpRemotePeer, mock_peers};
use nym_lp_data::packet::version;
use nym_test_utils::helpers::seeded_rng;
use nym_test_utils::mocks::async_read_write::MockIOStream;
use nym_test_utils::traits::TimeboxedSpawnable;
@@ -6,13 +6,15 @@ use crate::node::lp::control::{LP_DURATION_BUCKETS, LpConnectionStats};
use crate::node::lp::error::LpHandlerError;
use crate::node::lp::state::SharedLpClientControlState;
use dashmap::mapref::one::RefMut;
use nym_lp::packet::frame::LpFrameKind;
use nym_lp::packet::{EncryptedLpPacket, ForwardPacketData, LpFrame};
use nym_lp::peer_config::LpReceiverIndex;
use nym_lp::LpTransportSession;
use nym_lp::session::{LpAction, LpInput};
use nym_lp::transport::LpHandshakeChannel;
use nym_lp::transport::traits::LpTransportChannel;
use nym_lp::{LpTransportSession, packet::frame::ExpectedResponseSize};
use nym_lp_data::packet::frame::LpFrameKind;
use nym_lp_data::packet::header::LpReceiverIndex;
use nym_lp_data::packet::{
EncryptedLpPacket, ForwardPacketData, LpFrame, frame::ExpectedResponseSize,
};
use nym_metrics::{add_histogram_obs, inc};
use nym_node_metrics::NymNodeMetrics;
use nym_registration_common::{LpRegistrationRequest, RegistrationStatus};
+1 -1
View File
@@ -17,7 +17,7 @@
use crate::node::lp::error::LpHandlerError;
use crate::node::lp::state::SharedLpDataState;
use nym_lp::packet::OuterHeader;
use nym_lp_data::packet::OuterHeader;
use nym_metrics::inc;
use std::net::SocketAddr;
use tracing::*;
+2 -3
View File
@@ -1,11 +1,10 @@
// Copyright 2026 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use nym_lp::packet::frame::LpFrameKind;
use nym_lp::peer_config::LpReceiverIndex;
use nym_lp::LpError;
use nym_lp::session::LpAction;
use nym_lp::transport::LpTransportError;
use nym_lp::{LpError, packet::MalformedLpPacketError};
use nym_lp_data::packet::{MalformedLpPacketError, frame::LpFrameKind, header::LpReceiverIndex};
use nym_topology::NodeId;
use std::net::{IpAddr, SocketAddr};
use thiserror::Error;
+1 -1
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-3.0-only
use crate::node::lp::state::SharedLpClientControlState;
use nym_lp::peer_config::LpReceiverIndex;
use nym_lp_data::packet::header::LpReceiverIndex;
use nym_metrics::{add_histogram_obs, inc};
use nym_registration_common::dvpn::{
LpDvpnRegistrationFinalisation, LpDvpnRegistrationInitialRequest,
+1 -1
View File
@@ -10,7 +10,7 @@ use dashmap::mapref::one::RefMut;
use nym_gateway::node::wireguard::PeerRegistrator;
use nym_lp::LpTransportSession;
use nym_lp::peer::LpLocalPeer;
use nym_lp::peer_config::LpReceiverIndex;
use nym_lp_data::packet::header::LpReceiverIndex;
use nym_mixnet_client::forwarder::MixForwardingSender;
use nym_node_metrics::NymNodeMetrics;
use std::sync::Arc;