Skip to content

Commit

Permalink
Merge pull request #4267 from devnexen/deprecate_sockpacket
Browse files Browse the repository at this point in the history
linux: deprecate obsolete packet filter interfaces.
  • Loading branch information
tgross35 authored Feb 22, 2025
2 parents 60b269f + eb78ad0 commit 8ff30c0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,7 @@ pub const SOCK_STREAM: c_int = 1;
pub const SOCK_DGRAM: c_int = 2;
pub const SOCK_SEQPACKET: c_int = 5;
pub const SOCK_DCCP: c_int = 6;
#[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")]
pub const SOCK_PACKET: c_int = 10;

pub const IPPROTO_MAX: c_int = 256;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ pub const ENOTSUP: c_int = EOPNOTSUPP;

pub const SOCK_SEQPACKET: c_int = 5;
pub const SOCK_DCCP: c_int = 6;
#[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")]
pub const SOCK_PACKET: c_int = 10;

pub const AF_IB: c_int = 27;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ s! {
pub mr_address: [c_uchar; 8],
}

#[deprecated(since = "0.2.70", note = "sockaddr_ll type must be used instead")]
pub struct sockaddr_pkt {
pub spkt_family: c_ushort,
pub spkt_device: [c_uchar; 14],
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ pub const MAP_ANONYMOUS: c_int = MAP_ANON;
pub const SOCK_SEQPACKET: c_int = 5;
pub const SOCK_DCCP: c_int = 6;
pub const SOCK_NONBLOCK: c_int = O_NONBLOCK;
#[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")]
pub const SOCK_PACKET: c_int = 10;

pub const SOMAXCONN: c_int = 128;
Expand Down
1 change: 1 addition & 0 deletions src/unix/linux_like/linux/uclibc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ pub const RUSAGE_THREAD: c_int = 1;
pub const SHM_EXEC: c_int = 0o100000;
pub const SIGPOLL: c_int = SIGIO;
pub const SOCK_DCCP: c_int = 6;
#[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")]
pub const SOCK_PACKET: c_int = 10;
pub const TCP_COOKIE_TRANSACTIONS: c_int = 15;
pub const UDP_GRO: c_int = 104;
Expand Down

0 comments on commit 8ff30c0

Please sign in to comment.