Skip to content

Commit eb78ad0

Browse files
devnexentgross35
authored andcommitted
linux: deprecate obsolete packet filter interfaces.
sockaddr_ll/AF_PACKET are in place since Linux 2.2
1 parent ca7695a commit eb78ad0

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
@@ -1432,6 +1432,7 @@ pub const SOCK_STREAM: c_int = 1;
14321432
pub const SOCK_DGRAM: c_int = 2;
14331433
pub const SOCK_SEQPACKET: c_int = 5;
14341434
pub const SOCK_DCCP: c_int = 6;
1435+
#[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")]
14351436
pub const SOCK_PACKET: c_int = 10;
14361437

14371438
pub const IPPROTO_MAX: c_int = 256;

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

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

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

772773
pub const AF_IB: c_int = 27;

src/unix/linux_like/linux/mod.rs

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

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

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

+1
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,7 @@ pub const MAP_ANONYMOUS: c_int = MAP_ANON;
718718
pub const SOCK_SEQPACKET: c_int = 5;
719719
pub const SOCK_DCCP: c_int = 6;
720720
pub const SOCK_NONBLOCK: c_int = O_NONBLOCK;
721+
#[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")]
721722
pub const SOCK_PACKET: c_int = 10;
722723

723724
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)