Page MenuHomeFreeBSD

D38487.diff
No OneTemporary

D38487.diff

diff --git a/sys/net/if.c b/sys/net/if.c
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -4242,6 +4242,42 @@
return (0);
}
+int
+if_setcapabilities2(if_t ifp, int capabilities)
+{
+ ifp->if_capabilities2 = capabilities;
+ return (0);
+}
+
+int
+if_setcapabilities2bit(if_t ifp, int setbit, int clearbit)
+{
+ ifp->if_capabilities2 &= ~clearbit;
+ ifp->if_capabilities2 |= setbit;
+ return (0);
+}
+
+int
+if_getcapabilities2(const if_t ifp)
+{
+ return (ifp->if_capabilities2);
+}
+
+int
+if_setcapenable2(if_t ifp, int capabilities2)
+{
+ ifp->if_capenable2 = capabilities2;
+ return (0);
+}
+
+int
+if_setcapenable2bit(if_t ifp, int setcap, int clearcap)
+{
+ ifp->if_capenable2 &= ~clearcap;
+ ifp->if_capenable2 |= setcap;
+ return (0);
+}
+
const char *
if_getdname(const if_t ifp)
{
@@ -4283,6 +4319,19 @@
return ((struct ifnet *)ifp)->if_capenable;
}
+int
+if_togglecapenable2(if_t ifp, int togglecap)
+{
+ ifp->if_capenable2 ^= togglecap;
+ return (0);
+}
+
+int
+if_getcapenable2(const if_t ifp)
+{
+ return (ifp->if_capenable2);
+}
+
int
if_getdunit(const if_t ifp)
{
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -576,6 +576,13 @@
int if_setcapenable(if_t ifp, int capenable);
int if_setcapenablebit(if_t ifp, int setcap, int clearcap);
int if_getcapenable(const if_t ifp);
+int if_setcapabilities2(if_t ifp, int capabilities);
+int if_setcapabilities2bit(if_t ifp, int setbit, int clearbit);
+int if_getcapabilities2(const if_t ifp);
+int if_togglecapenable2(if_t ifp, int togglecap);
+int if_setcapenable2(if_t ifp, int capenable);
+int if_setcapenable2bit(if_t ifp, int setcap, int clearcap);
+int if_getcapenable2(const if_t ifp);
int if_getdunit(const if_t ifp);
int if_getindex(const if_t ifp);
int if_getidxgen(const if_t ifp);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 11:47 PM (20 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14706760
Default Alt Text
D38487.diff (1 KB)

Event Timeline