From nobody Tue Feb 14 15:36:22 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGQKf2V3Yz3s58j; Tue, 14 Feb 2023 15:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGQKf2K4dz4LQJ; Tue, 14 Feb 2023 15:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8KT/x9i4JYYob1wvY7jrPkmkyVop1Gz/iudLur5xTc=; b=Vm9nSNp74ZAaZ1NGtRssDwhY9rOAX0g+M4K5opOcNiiyR2dpe3f32lhVqfPQ95Yx9CELsX 7WHqDrcBUt6ZD5G1wr66lcjqtsyI5wr7laN2xg3iBd3+Pqxi9eDBcMe/eqPcqJJcHq9/cY IRmaI9BSEf1B9XFvvDBMnjS1QjA159mRJ50zPAH5PCq/6GBlTIti4t0kd9b8Fm1KAI8bX8 vN349ystjSZtC0xPy+FY9MKfX5Z9brS0tokJaknatYRuuggtAmbW1JR/OzLlJwPkBAknS+ +7hpYVDFCc3CnoydNQ+wWmeN021k03D3AeWWYb2nO3b7LKx4mEBhZ4Yx6U3VtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676388982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8KT/x9i4JYYob1wvY7jrPkmkyVop1Gz/iudLur5xTc=; b=IybtpstnJwuwm0RpZ5Dt1pD35P9ZDUINo4TiohPSy/ijpJji0TpeY5Or2Qv4gDgf//oXbe aOnQAEN3qYr56JbHvpIqsa4ZaN/cx8+A1UVsAvFYz0/eoVlBgycGykHFRdPmsbS0rRwRBx g+Vo4FmdV44ieFJ/TqDIr6OiX80rbICr5JuZchdHNWbgsraq4nlEmJNS6qyBh1ZmMtEJsL QSA0lGOiWyChGtxPl/+70dD8Z98geKuTwO+vA4yKDJoLMzjR7f6feV/N3LBtVpYP+5pRm9 hX+QSjVWbZpSYnpYlsWJxAWsae2s5TNMKcN8hMQ2h/q02iNkiQY/7fMlUnVgbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676388982; a=rsa-sha256; cv=none; b=xzaojjKoF4pdCVpsB/sheiH6gIeWB9MxMkvIPCfDZp7e8oB6H48vGkm1cHdduNwe3+JB4s j0j9PN0g8BmxtmvFdp7s38Lwbh6d2tg/y0tR3A7J9NwYJ2vL6dCbI4Cnf0P0blvaf0GB7H RzT2o88EdU18gxgVN4Tk8w5PLxa2WW6K128Pf35oaUX1+BtytJcK+gQH9mkaAEgNBCwvFG Rq3pBMWub3/9DoChlUwB/JKze2Lb24QAymq85mKZ9tKRISe+CBQASApzZ26rKvo+tCBWbn VUvXs3EOTCmyFXgE1+plBTnwWhASY3xHfrMsCjWaaMEgxGihXU/bpuItBilu1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGQKf1NBnz146w; Tue, 14 Feb 2023 15:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31EFaMfd043791; Tue, 14 Feb 2023 15:36:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31EFaMvv043790; Tue, 14 Feb 2023 15:36:22 GMT (envelope-from git) Date: Tue, 14 Feb 2023 15:36:22 GMT Message-Id: <202302141536.31EFaMvv043790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: aac2d19d9385 - main - IfAPI: Style cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aac2d19d9385188bfc08483b4b04da9a9fa79a3c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=aac2d19d9385188bfc08483b4b04da9a9fa79a3c commit aac2d19d9385188bfc08483b4b04da9a9fa79a3c Author: Justin Hibbits AuthorDate: 2023-02-10 21:33:30 +0000 Commit: Justin Hibbits CommitDate: 2023-02-14 15:21:20 +0000 IfAPI: Style cleanup Summary: Clean up style issues from IfAPI additions. Casts to (struct ifnet *) made sense when `if_t` was a `void *`, but since it's a `struct ifnet *` it no longer makes sense. Fix whitespace errors, among others. Reviewed by: kib, glebius Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38499 --- sys/net/if.c | 172 ++++++++++++++++++++++--------------------------------- sys/net/if_var.h | 4 +- 2 files changed, 72 insertions(+), 104 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index da684dedec73..bc13cdaf05f5 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -3964,7 +3964,6 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len) static int if_requestencap_default(struct ifnet *ifp, struct if_encap_req *req) { - if (req->rtype != IFENCAP_LL) return (EOPNOTSUPP); @@ -4034,7 +4033,6 @@ if_tunnel_check_nesting(struct ifnet *ifp, struct mbuf *m, uint32_t cookie, int if_gethwaddr(struct ifnet *ifp, struct ifreq *ifr) { - if (ifp->if_hw_addr == NULL) return (ENODEV); @@ -4121,7 +4119,6 @@ if_transmit_default(struct ifnet *ifp, struct mbuf *m) static void if_input_default(struct ifnet *ifp __unused, struct mbuf *m) { - m_freem(m); } @@ -4198,47 +4195,42 @@ if_setbaudrate(struct ifnet *ifp, uint64_t baudrate) uint64_t if_getbaudrate(const if_t ifp) { - - return (((struct ifnet *)ifp)->if_baudrate); + return (ifp->if_baudrate); } int if_setcapabilities(if_t ifp, int capabilities) { - ((struct ifnet *)ifp)->if_capabilities = capabilities; + ifp->if_capabilities = capabilities; return (0); } int if_setcapabilitiesbit(if_t ifp, int setbit, int clearbit) { - ((struct ifnet *)ifp)->if_capabilities &= ~clearbit; - ((struct ifnet *)ifp)->if_capabilities |= setbit; - + ifp->if_capabilities &= ~clearbit; + ifp->if_capabilities |= setbit; return (0); } int if_getcapabilities(const if_t ifp) { - return ((struct ifnet *)ifp)->if_capabilities; + return (ifp->if_capabilities); } int if_setcapenable(if_t ifp, int capabilities) { - ((struct ifnet *)ifp)->if_capenable = capabilities; + ifp->if_capenable = capabilities; return (0); } int if_setcapenablebit(if_t ifp, int setcap, int clearcap) { - if(clearcap) - ((struct ifnet *)ifp)->if_capenable &= ~clearcap; - if(setcap) - ((struct ifnet *)ifp)->if_capenable |= setcap; - + ifp->if_capenable &= ~clearcap; + ifp->if_capenable |= setcap; return (0); } @@ -4281,19 +4273,19 @@ if_setcapenable2bit(if_t ifp, int setcap, int clearcap) const char * if_getdname(const if_t ifp) { - return ((struct ifnet *)ifp)->if_dname; + return (ifp->if_dname); } void if_setdname(if_t ifp, const char *dname) { - ((struct ifnet *)ifp)->if_dname = dname; + ifp->if_dname = dname; } const char * if_name(if_t ifp) { - return ((struct ifnet *)ifp)->if_xname; + return (ifp->if_xname); } int @@ -4301,7 +4293,7 @@ if_setname(if_t ifp, const char *name) { if (strlen(name) > sizeof(ifp->if_xname) - 1) return (ENAMETOOLONG); - strlcpy(ifp->if_xname, name, sizeof(ifp->if_xname)); + strcpy(ifp->if_xname, name); return (0); } @@ -4309,14 +4301,14 @@ if_setname(if_t ifp, const char *name) int if_togglecapenable(if_t ifp, int togglecap) { - ((struct ifnet *)ifp)->if_capenable ^= togglecap; + ifp->if_capenable ^= togglecap; return (0); } int if_getcapenable(const if_t ifp) { - return ((struct ifnet *)ifp)->if_capenable; + return (ifp->if_capenable); } int @@ -4335,13 +4327,13 @@ if_getcapenable2(const if_t ifp) int if_getdunit(const if_t ifp) { - return ((struct ifnet *)ifp)->if_dunit; + return (ifp->if_dunit); } int if_getindex(const if_t ifp) { - return ((struct ifnet *)ifp)->if_index; + return (ifp->if_index); } int @@ -4377,7 +4369,7 @@ if_freedescr(char *descrbuf) int if_getalloctype(const if_t ifp) { - return ((struct ifnet *)ifp)->if_alloctype; + return (ifp->if_alloctype); } /* @@ -4395,8 +4387,8 @@ if_setdev(if_t ifp, void *dev) int if_setdrvflagbits(if_t ifp, int set_flags, int clear_flags) { - ((struct ifnet *)ifp)->if_drv_flags &= ~clear_flags; - ((struct ifnet *)ifp)->if_drv_flags |= set_flags; + ifp->if_drv_flags &= ~clear_flags; + ifp->if_drv_flags |= set_flags; return (0); } @@ -4404,20 +4396,19 @@ if_setdrvflagbits(if_t ifp, int set_flags, int clear_flags) int if_getdrvflags(const if_t ifp) { - return ((struct ifnet *)ifp)->if_drv_flags; + return (ifp->if_drv_flags); } int if_setdrvflags(if_t ifp, int flags) { - ((struct ifnet *)ifp)->if_drv_flags = flags; + ifp->if_drv_flags = flags; return (0); } int if_setflags(if_t ifp, int flags) { - ifp->if_flags = flags; return (0); } @@ -4425,30 +4416,29 @@ if_setflags(if_t ifp, int flags) int if_setflagbits(if_t ifp, int set, int clear) { - ((struct ifnet *)ifp)->if_flags &= ~clear; - ((struct ifnet *)ifp)->if_flags |= set; - + ifp->if_flags &= ~clear; + ifp->if_flags |= set; return (0); } int if_getflags(const if_t ifp) { - return ((struct ifnet *)ifp)->if_flags; + return (ifp->if_flags); } int if_clearhwassist(if_t ifp) { - ((struct ifnet *)ifp)->if_hwassist = 0; + ifp->if_hwassist = 0; return (0); } int if_sethwassistbits(if_t ifp, int toset, int toclear) { - ((struct ifnet *)ifp)->if_hwassist &= ~toclear; - ((struct ifnet *)ifp)->if_hwassist |= toset; + ifp->if_hwassist &= ~toclear; + ifp->if_hwassist |= toset; return (0); } @@ -4456,34 +4446,34 @@ if_sethwassistbits(if_t ifp, int toset, int toclear) int if_sethwassist(if_t ifp, int hwassist_bit) { - ((struct ifnet *)ifp)->if_hwassist = hwassist_bit; + ifp->if_hwassist = hwassist_bit; return (0); } int if_gethwassist(const if_t ifp) { - return ((struct ifnet *)ifp)->if_hwassist; + return (ifp->if_hwassist); } int if_togglehwassist(if_t ifp, int toggle_bits) { - ((struct ifnet *)ifp)->if_hwassist ^= toggle_bits; + ifp->if_hwassist ^= toggle_bits; return (0); } int if_setmtu(if_t ifp, int mtu) { - ((struct ifnet *)ifp)->if_mtu = mtu; + ifp->if_mtu = mtu; return (0); } int if_getmtu(const if_t ifp) { - return ((struct ifnet *)ifp)->if_mtu; + return (ifp->if_mtu); } int @@ -4493,10 +4483,10 @@ if_getmtu_family(const if_t ifp, int family) SLIST_FOREACH(dp, &domains, dom_next) { if (dp->dom_family == family && dp->dom_ifmtu != NULL) - return (dp->dom_ifmtu((struct ifnet *)ifp)); + return (dp->dom_ifmtu(ifp)); } - return (((struct ifnet *)ifp)->if_mtu); + return (ifp->if_mtu); } /* @@ -4625,14 +4615,14 @@ if_foreach_addr_type(if_t ifp, int type, if_addr_cb_t cb, void *cb_arg) int if_setsoftc(if_t ifp, void *softc) { - ((struct ifnet *)ifp)->if_softc = softc; + ifp->if_softc = softc; return (0); } void * if_getsoftc(const if_t ifp) { - return ((struct ifnet *)ifp)->if_softc; + return (ifp->if_softc); } void @@ -4652,41 +4642,39 @@ if_setvtag(struct mbuf *m, uint16_t tag) uint16_t if_getvtag(struct mbuf *m) { - return (m->m_pkthdr.ether_vtag); } int if_sendq_empty(if_t ifp) { - return IFQ_DRV_IS_EMPTY(&((struct ifnet *)ifp)->if_snd); + return (IFQ_DRV_IS_EMPTY(&ifp->if_snd)); } struct ifaddr * if_getifaddr(const if_t ifp) { - return ((struct ifnet *)ifp)->if_addr; + return (ifp->if_addr); } int if_getamcount(const if_t ifp) { - return ((struct ifnet *)ifp)->if_amcount; + return (ifp->if_amcount); } int if_setsendqready(if_t ifp) { - IFQ_SET_READY(&((struct ifnet *)ifp)->if_snd); + IFQ_SET_READY(&ifp->if_snd); return (0); } int if_setsendqlen(if_t ifp, int tx_desc_count) { - IFQ_SET_MAXLEN(&((struct ifnet *)ifp)->if_snd, tx_desc_count); - ((struct ifnet *)ifp)->if_snd.ifq_drv_maxlen = tx_desc_count; - + IFQ_SET_MAXLEN(&ifp->if_snd, tx_desc_count); + ifp->if_snd.ifq_drv_maxlen = tx_desc_count; return (0); } @@ -4705,29 +4693,25 @@ if_getnetmapadapter(if_t ifp) int if_vlantrunkinuse(if_t ifp) { - return ((struct ifnet *)ifp)->if_vlantrunk != NULL?1:0; + return (ifp->if_vlantrunk != NULL); } -int +void if_init(if_t ifp, void *ctx) { - (*((struct ifnet *)ifp)->if_init)(ctx); - return (0); + (*ifp->if_init)(ctx); } -int +void if_input(if_t ifp, struct mbuf* sendmp) { - (*((struct ifnet *)ifp)->if_input)((struct ifnet *)ifp, sendmp); - return (0); - + (*ifp->if_input)(ifp, sendmp); } int if_transmit(if_t ifp, struct mbuf *m) { - (*((struct ifnet *)ifp)->if_transmit)((struct ifnet *)ifp, m); - return (0); + return ((*ifp->if_transmit)(ifp, m)); } int @@ -4743,29 +4727,29 @@ struct mbuf * if_dequeue(if_t ifp) { struct mbuf *m; - IFQ_DRV_DEQUEUE(&((struct ifnet *)ifp)->if_snd, m); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m); return (m); } int if_sendq_prepend(if_t ifp, struct mbuf *m) { - IFQ_DRV_PREPEND(&((struct ifnet *)ifp)->if_snd, m); + IFQ_DRV_PREPEND(&ifp->if_snd, m); return (0); } int if_setifheaderlen(if_t ifp, int len) { - ((struct ifnet *)ifp)->if_hdrlen = len; + ifp->if_hdrlen = len; return (0); } caddr_t if_getlladdr(const if_t ifp) { - return (IF_LLADDR((struct ifnet *)ifp)); + return (IF_LLADDR(ifp)); } void * @@ -4775,83 +4759,72 @@ if_gethandle(u_char type) } void -if_bpfmtap(if_t ifh, struct mbuf *m) +if_bpfmtap(if_t ifp, struct mbuf *m) { - struct ifnet *ifp = (struct ifnet *)ifh; - BPF_MTAP(ifp, m); } void -if_etherbpfmtap(if_t ifh, struct mbuf *m) +if_etherbpfmtap(if_t ifp, struct mbuf *m) { - struct ifnet *ifp = (struct ifnet *)ifh; - ETHER_BPF_MTAP(ifp, m); } void -if_vlancap(if_t ifh) +if_vlancap(if_t ifp) { - struct ifnet *ifp = (struct ifnet *)ifh; VLAN_CAPABILITIES(ifp); } int if_sethwtsomax(if_t ifp, u_int if_hw_tsomax) { - - ((struct ifnet *)ifp)->if_hw_tsomax = if_hw_tsomax; + ifp->if_hw_tsomax = if_hw_tsomax; return (0); } int if_sethwtsomaxsegcount(if_t ifp, u_int if_hw_tsomaxsegcount) { - - ((struct ifnet *)ifp)->if_hw_tsomaxsegcount = if_hw_tsomaxsegcount; + ifp->if_hw_tsomaxsegcount = if_hw_tsomaxsegcount; return (0); } int if_sethwtsomaxsegsize(if_t ifp, u_int if_hw_tsomaxsegsize) { - - ((struct ifnet *)ifp)->if_hw_tsomaxsegsize = if_hw_tsomaxsegsize; + ifp->if_hw_tsomaxsegsize = if_hw_tsomaxsegsize; return (0); } u_int if_gethwtsomax(const if_t ifp) { - - return (((struct ifnet *)ifp)->if_hw_tsomax); + return (ifp->if_hw_tsomax); } u_int if_gethwtsomaxsegcount(const if_t ifp) { - - return (((struct ifnet *)ifp)->if_hw_tsomaxsegcount); + return (ifp->if_hw_tsomaxsegcount); } u_int if_gethwtsomaxsegsize(const if_t ifp) { - - return (((struct ifnet *)ifp)->if_hw_tsomaxsegsize); + return (ifp->if_hw_tsomaxsegsize); } void if_setinitfn(if_t ifp, if_init_fn_t init_fn) { - ((struct ifnet *)ifp)->if_init = init_fn; + ifp->if_init = init_fn; } void if_setinputfn(if_t ifp, if_input_fn_t input_fn) { - ((struct ifnet *)ifp)->if_input = input_fn; + ifp->if_input = input_fn; } if_input_fn_t @@ -4863,19 +4836,19 @@ if_getinputfn(if_t ifp) void if_setioctlfn(if_t ifp, if_ioctl_fn_t ioctl_fn) { - ((struct ifnet *)ifp)->if_ioctl = (void *)ioctl_fn; + ifp->if_ioctl = ioctl_fn; } void if_setoutputfn(if_t ifp, if_output_fn_t output_fn) { - ((struct ifnet *)ifp)->if_output = output_fn; + ifp->if_output = output_fn; } void if_setstartfn(if_t ifp, if_start_fn_t start_fn) { - ((struct ifnet *)ifp)->if_start = (void *)start_fn; + ifp->if_start = start_fn; } if_start_fn_t @@ -4887,7 +4860,7 @@ if_getstartfn(if_t ifp) void if_settransmitfn(if_t ifp, if_transmit_fn_t start_fn) { - ((struct ifnet *)ifp)->if_transmit = start_fn; + ifp->if_transmit = start_fn; } if_transmit_fn_t @@ -4899,21 +4872,19 @@ if_gettransmitfn(if_t ifp) void if_setqflushfn(if_t ifp, if_qflush_fn_t flush_fn) { - ((struct ifnet *)ifp)->if_qflush = flush_fn; - + ifp->if_qflush = flush_fn; } void if_setsndtagallocfn(if_t ifp, if_snd_tag_alloc_t alloc_fn) { - ((struct ifnet *)ifp)->if_snd_tag_alloc = alloc_fn; + ifp->if_snd_tag_alloc = alloc_fn; } int -if_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, +if_snd_tag_alloc(if_t ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **mstp) { - if (ifp->if_snd_tag_alloc == NULL) return (EOPNOTSUPP); return (ifp->if_snd_tag_alloc(ifp, params, mstp)); @@ -4922,7 +4893,6 @@ if_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, void if_setgetcounterfn(if_t ifp, if_get_counter_t fn) { - ifp->if_get_counter = fn; } @@ -5062,7 +5032,6 @@ if_getl2com(if_t ifp) static void if_show_ifnet(struct ifnet *ifp) { - if (ifp == NULL) return; db_printf("%s:\n", ifp->if_xname); @@ -5112,7 +5081,6 @@ if_show_ifnet(struct ifnet *ifp) DB_SHOW_COMMAND(ifnet, db_show_ifnet) { - if (!have_addr) { db_printf("usage: show ifnet \n"); return; diff --git a/sys/net/if_var.h b/sys/net/if_var.h index ef3e3d71a262..7200cd5634d3 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -633,7 +633,7 @@ u_int if_gethwtsomaxsegcount(const if_t ifp); u_int if_gethwtsomaxsegsize(const if_t ifp); void if_setnetmapadapter(if_t ifp, struct netmap_adapter *na); struct netmap_adapter *if_getnetmapadapter(if_t ifp); -int if_input(if_t ifp, struct mbuf* sendmp); +void if_input(if_t ifp, struct mbuf* sendmp); int if_sendq_prepend(if_t ifp, struct mbuf *m); struct mbuf *if_dequeue(if_t ifp); int if_setifheaderlen(if_t ifp, int len); @@ -648,7 +648,7 @@ void if_bpfmtap(if_t ifp, struct mbuf *m); void if_etherbpfmtap(if_t ifp, struct mbuf *m); void if_vlancap(if_t ifp); int if_transmit(if_t ifp, struct mbuf *m); -int if_init(if_t ifp, void *ctx); +void if_init(if_t ifp, void *ctx); int if_resolvemulti(if_t ifp, struct sockaddr **, struct sockaddr *); uint64_t if_getcounter(if_t ifp, ift_counter counter); struct label *if_getmaclabel(if_t ifp);