Skip to content

Commit 0149964

Browse files
devnexentgross35
authored andcommitted
linux: deprecate obsolete packet filter interfaces.
sockaddr_ll/AF_PACKET are in place since Linux 2.2 (backport <rust-lang#4267>) (cherry picked from commit eb78ad0)
1 parent 9ee1fc9 commit 0149964

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

src/unix/linux_like/android/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,7 @@ pub const SOCK_STREAM: c_int = 1;
14741474
pub const SOCK_DGRAM: c_int = 2;
14751475
pub const SOCK_SEQPACKET: c_int = 5;
14761476
pub const SOCK_DCCP: c_int = 6;
1477+
#[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")]
14771478
pub const SOCK_PACKET: c_int = 10;
14781479

14791480
pub const IPPROTO_MAX: c_int = 256;

src/unix/linux_like/linux/gnu/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ pub const ENOTSUP: c_int = EOPNOTSUPP;
763763

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

768769
pub const AF_IB: c_int = 27;

src/unix/linux_like/linux/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ s! {
186186
pub mr_address: [c_uchar; 8],
187187
}
188188

189+
#[deprecated(since = "0.2.70", note = "sockaddr_ll type must be used instead")]
189190
pub struct sockaddr_pkt {
190191
pub spkt_family: c_ushort,
191192
pub spkt_device: [c_uchar; 14],

src/unix/linux_like/linux/musl/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ pub const MAP_ANONYMOUS: c_int = MAP_ANON;
716716
pub const SOCK_SEQPACKET: c_int = 5;
717717
pub const SOCK_DCCP: c_int = 6;
718718
pub const SOCK_NONBLOCK: c_int = O_NONBLOCK;
719+
#[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")]
719720
pub const SOCK_PACKET: c_int = 10;
720721

721722
pub const SOMAXCONN: c_int = 128;

src/unix/linux_like/linux/uclibc/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ pub const RUSAGE_THREAD: c_int = 1;
382382
pub const SHM_EXEC: c_int = 0o100000;
383383
pub const SIGPOLL: c_int = SIGIO;
384384
pub const SOCK_DCCP: c_int = 6;
385+
#[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")]
385386
pub const SOCK_PACKET: c_int = 10;
386387
pub const TCP_COOKIE_TRANSACTIONS: c_int = 15;
387388
pub const UDP_GRO: c_int = 104;

0 commit comments

Comments
 (0)