14c7070dbSScott Long# 209f6ff4fSMatt Macy# Copyright (c) 2014-2018, Matthew Macy (mmacy@mattmacy.io) 34c7070dbSScott Long# All rights reserved. 44c7070dbSScott Long# 54c7070dbSScott Long# Redistribution and use in source and binary forms, with or without 64c7070dbSScott Long# modification, are permitted provided that the following conditions are met: 74c7070dbSScott Long# 84c7070dbSScott Long# 1. Redistributions of source code must retain the above copyright notice, 94c7070dbSScott Long# this list of conditions and the following disclaimer. 104c7070dbSScott Long# 114c7070dbSScott Long# 2. Neither the name of Matthew Macy nor the names of its 124c7070dbSScott Long# contributors may be used to endorse or promote products derived from 134c7070dbSScott Long# this software without specific prior written permission. 144c7070dbSScott Long# 154c7070dbSScott Long# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 164c7070dbSScott Long# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 174c7070dbSScott Long# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 184c7070dbSScott Long# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 194c7070dbSScott Long# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 204c7070dbSScott Long# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 214c7070dbSScott Long# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 224c7070dbSScott Long# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 234c7070dbSScott Long# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 244c7070dbSScott Long# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 254c7070dbSScott Long# POSSIBILITY OF SUCH DAMAGE. 264c7070dbSScott Long# 274c7070dbSScott Long# $FreeBSD$ 284c7070dbSScott Long# 294c7070dbSScott Long 304c7070dbSScott Long#include <sys/types.h> 314c7070dbSScott Long#include <sys/systm.h> 324c7070dbSScott Long#include <sys/socket.h> 334c7070dbSScott Long 344c7070dbSScott Long#include <machine/bus.h> 354c7070dbSScott Long#include <sys/bus.h> 364c7070dbSScott Long 374c7070dbSScott Long#include <net/ethernet.h> 384c7070dbSScott Long#include <net/if.h> 394c7070dbSScott Long#include <net/if_var.h> 404c7070dbSScott Long#include <net/if_media.h> 414c7070dbSScott Long#include <net/iflib.h> 4209f6ff4fSMatt Macy#include <net/if_clone.h> 4309f6ff4fSMatt Macy#include <net/if_dl.h> 4409f6ff4fSMatt Macy#include <net/if_types.h> 454c7070dbSScott Long 464c7070dbSScott LongINTERFACE ifdi; 474c7070dbSScott Long 484c7070dbSScott LongCODE { 494c7070dbSScott Long 504c7070dbSScott Long static void 514c7070dbSScott Long null_void_op(if_ctx_t _ctx __unused) 524c7070dbSScott Long { 534c7070dbSScott Long } 544c7070dbSScott Long 5509f6ff4fSMatt Macy static int 5609f6ff4fSMatt Macy null_knlist_add(if_ctx_t _ctx __unused, struct knote *_kn) 5709f6ff4fSMatt Macy { 5809f6ff4fSMatt Macy return (0); 5909f6ff4fSMatt Macy } 6009f6ff4fSMatt Macy 6109f6ff4fSMatt Macy static int 6209f6ff4fSMatt Macy null_knote_event(if_ctx_t _ctx __unused, struct knote *_kn, int _hint) 6309f6ff4fSMatt Macy { 6409f6ff4fSMatt Macy return (0); 6509f6ff4fSMatt Macy } 6609f6ff4fSMatt Macy 674c7070dbSScott Long static void 684c7070dbSScott Long null_timer_op(if_ctx_t _ctx __unused, uint16_t _qsidx __unused) 694c7070dbSScott Long { 704c7070dbSScott Long } 714c7070dbSScott Long 724c7070dbSScott Long static int 734c7070dbSScott Long null_int_op(if_ctx_t _ctx __unused) 744c7070dbSScott Long { 754c7070dbSScott Long return (0); 764c7070dbSScott Long } 774c7070dbSScott Long 7823ac9029SStephen Hurd static int 7909f6ff4fSMatt Macy null_int_int_op(if_ctx_t _ctx __unused, int arg0 __unused) 8009f6ff4fSMatt Macy { 8109f6ff4fSMatt Macy return (ENOTSUP); 8209f6ff4fSMatt Macy } 8309f6ff4fSMatt Macy 8409f6ff4fSMatt Macy static int 854c7070dbSScott Long null_queue_intr_enable(if_ctx_t _ctx __unused, uint16_t _qid __unused) 864c7070dbSScott Long { 8723ac9029SStephen Hurd return (ENOTSUP); 884c7070dbSScott Long } 894c7070dbSScott Long 904c7070dbSScott Long static void 914c7070dbSScott Long null_led_func(if_ctx_t _ctx __unused, int _onoff __unused) 924c7070dbSScott Long { 934c7070dbSScott Long } 944c7070dbSScott Long 954c7070dbSScott Long static void 964c7070dbSScott Long null_vlan_register_op(if_ctx_t _ctx __unused, uint16_t vtag __unused) 974c7070dbSScott Long { 984c7070dbSScott Long } 994c7070dbSScott Long 1004c7070dbSScott Long static int 1014c7070dbSScott Long null_q_setup(if_ctx_t _ctx __unused, uint32_t _qid __unused) 1024c7070dbSScott Long { 1034c7070dbSScott Long return (0); 1044c7070dbSScott Long } 1054c7070dbSScott Long 1064c7070dbSScott Long static int 1074c7070dbSScott Long null_i2c_req(if_ctx_t _sctx __unused, struct ifi2creq *_i2c __unused) 1084c7070dbSScott Long { 1094c7070dbSScott Long return (ENOTSUP); 1104c7070dbSScott Long } 1114c7070dbSScott Long 1124c7070dbSScott Long static int 1134c7070dbSScott Long null_sysctl_int_delay(if_ctx_t _sctx __unused, if_int_delay_info_t _iidi __unused) 1144c7070dbSScott Long { 1154c7070dbSScott Long return (0); 1164c7070dbSScott Long } 1174c7070dbSScott Long 1184c7070dbSScott Long static int 1194c7070dbSScott Long null_iov_init(if_ctx_t _ctx __unused, uint16_t num_vfs __unused, const nvlist_t *params __unused) 1204c7070dbSScott Long { 1214c7070dbSScott Long return (ENOTSUP); 1224c7070dbSScott Long } 1234c7070dbSScott Long 1244c7070dbSScott Long static int 1254c7070dbSScott Long null_vf_add(if_ctx_t _ctx __unused, uint16_t num_vfs __unused, const nvlist_t *params __unused) 1264c7070dbSScott Long { 1274c7070dbSScott Long return (ENOTSUP); 1284c7070dbSScott Long } 1294c7070dbSScott Long 1304c7070dbSScott Long static int 1314c7070dbSScott Long null_priv_ioctl(if_ctx_t _ctx __unused, u_long command, caddr_t *data __unused) 1324c7070dbSScott Long { 1334c7070dbSScott Long return (ENOTSUP); 1344c7070dbSScott Long } 13509f6ff4fSMatt Macy 13609f6ff4fSMatt Macy static void 13709f6ff4fSMatt Macy null_media_status(if_ctx_t ctx __unused, struct ifmediareq *ifmr) 13809f6ff4fSMatt Macy { 13909f6ff4fSMatt Macy ifmr->ifm_status = IFM_AVALID | IFM_ACTIVE; 14009f6ff4fSMatt Macy ifmr->ifm_active = IFM_ETHER | IFM_25G_ACC | IFM_FDX; 14109f6ff4fSMatt Macy } 14209f6ff4fSMatt Macy 14309f6ff4fSMatt Macy static int 14409f6ff4fSMatt Macy null_cloneattach(if_ctx_t ctx __unused, struct if_clone *ifc __unused, 14509f6ff4fSMatt Macy const char *name __unused, caddr_t params __unused) 14609f6ff4fSMatt Macy { 14709f6ff4fSMatt Macy return (0); 14809f6ff4fSMatt Macy } 14909f6ff4fSMatt Macy 15009f6ff4fSMatt Macy static void 15109f6ff4fSMatt Macy null_rx_clset(if_ctx_t _ctx __unused, uint16_t _flid __unused, 15209f6ff4fSMatt Macy uint16_t _qid __unused, caddr_t *_sdcl __unused) 15309f6ff4fSMatt Macy { 15409f6ff4fSMatt Macy } 15509f6ff4fSMatt Macy static void 15609f6ff4fSMatt Macy null_object_info_get(if_ctx_t ctx __unused, void *data __unused, int size __unused) 15709f6ff4fSMatt Macy { 15809f6ff4fSMatt Macy } 15909f6ff4fSMatt Macy static int 16009f6ff4fSMatt Macy default_mac_set(if_ctx_t ctx, const uint8_t *mac) 16109f6ff4fSMatt Macy { 16209f6ff4fSMatt Macy struct ifnet *ifp = iflib_get_ifp(ctx); 16309f6ff4fSMatt Macy struct sockaddr_dl *sdl; 16409f6ff4fSMatt Macy 16509f6ff4fSMatt Macy if (ifp && ifp->if_addr) { 16609f6ff4fSMatt Macy sdl = (struct sockaddr_dl *)ifp->if_addr->ifa_addr; 16709f6ff4fSMatt Macy MPASS(sdl->sdl_type == IFT_ETHER); 16809f6ff4fSMatt Macy memcpy(LLADDR(sdl), mac, ETHER_ADDR_LEN); 16909f6ff4fSMatt Macy } 17009f6ff4fSMatt Macy return (0); 17109f6ff4fSMatt Macy } 17245818bf1SEric Joyner 17345818bf1SEric Joyner static bool 17445818bf1SEric Joyner null_needs_restart(if_ctx_t _ctx __unused, enum iflib_restart_event _event __unused) 17545818bf1SEric Joyner { 17645818bf1SEric Joyner return (true); 17745818bf1SEric Joyner } 1784c7070dbSScott Long}; 1794c7070dbSScott Long 1804c7070dbSScott Long# 18109f6ff4fSMatt Macy# kevent interfaces 18209f6ff4fSMatt Macy# 18309f6ff4fSMatt Macy 18409f6ff4fSMatt MacyMETHOD int knlist_add { 18509f6ff4fSMatt Macy if_ctx_t _ctx; 18609f6ff4fSMatt Macy struct knote *_kn; 18709f6ff4fSMatt Macy} DEFAULT null_knlist_add; 18809f6ff4fSMatt Macy 18909f6ff4fSMatt MacyMETHOD int knote_event { 19009f6ff4fSMatt Macy if_ctx_t _ctx; 19109f6ff4fSMatt Macy struct knote *_kn; 19209f6ff4fSMatt Macy int hint; 19309f6ff4fSMatt Macy} DEFAULT null_knote_event; 19409f6ff4fSMatt Macy 19509f6ff4fSMatt Macy 19609f6ff4fSMatt Macy# 19709f6ff4fSMatt Macy# query 19809f6ff4fSMatt Macy# 19909f6ff4fSMatt Macy 20009f6ff4fSMatt MacyMETHOD int object_info_get { 20109f6ff4fSMatt Macy if_ctx_t _ctx; 20209f6ff4fSMatt Macy void *data; 20309f6ff4fSMatt Macy int size; 20409f6ff4fSMatt Macy} DEFAULT null_object_info_get; 20509f6ff4fSMatt Macy 20609f6ff4fSMatt Macy# 2074c7070dbSScott Long# bus interfaces 2084c7070dbSScott Long# 2094c7070dbSScott Long 2104c7070dbSScott LongMETHOD int attach_pre { 2114c7070dbSScott Long if_ctx_t _ctx; 21209f6ff4fSMatt Macy} DEFAULT null_int_op; 2134c7070dbSScott Long 2144c7070dbSScott LongMETHOD int attach_post { 2154c7070dbSScott Long if_ctx_t _ctx; 21609f6ff4fSMatt Macy} DEFAULT null_int_op; 21709f6ff4fSMatt Macy 21809f6ff4fSMatt MacyMETHOD int reinit_pre { 21909f6ff4fSMatt Macy if_ctx_t _ctx; 22009f6ff4fSMatt Macy} DEFAULT null_int_op; 22109f6ff4fSMatt Macy 22209f6ff4fSMatt MacyMETHOD int reinit_post { 22309f6ff4fSMatt Macy if_ctx_t _ctx; 22409f6ff4fSMatt Macy} DEFAULT null_int_op; 22509f6ff4fSMatt Macy 22609f6ff4fSMatt MacyMETHOD int cloneattach { 22709f6ff4fSMatt Macy if_ctx_t _ctx; 22809f6ff4fSMatt Macy struct if_clone *_ifc; 22909f6ff4fSMatt Macy const char *_name; 23009f6ff4fSMatt Macy caddr_t params; 23109f6ff4fSMatt Macy} DEFAULT null_cloneattach; 2324c7070dbSScott Long 2334c7070dbSScott LongMETHOD int detach { 2344c7070dbSScott Long if_ctx_t _ctx; 2354c7070dbSScott Long}; 2364c7070dbSScott Long 2374c7070dbSScott LongMETHOD int suspend { 2384c7070dbSScott Long if_ctx_t _ctx; 2394c7070dbSScott Long} DEFAULT null_int_op; 2404c7070dbSScott Long 2414c7070dbSScott LongMETHOD int shutdown { 2424c7070dbSScott Long if_ctx_t _ctx; 2434c7070dbSScott Long} DEFAULT null_int_op; 2444c7070dbSScott Long 2454c7070dbSScott LongMETHOD int resume { 2464c7070dbSScott Long if_ctx_t _ctx; 2474c7070dbSScott Long} DEFAULT null_int_op; 2484c7070dbSScott Long 2494c7070dbSScott Long# 2504c7070dbSScott Long# downcall to driver to allocate its 2514c7070dbSScott Long# own queue state and tie it to the parent 2524c7070dbSScott Long# 2534c7070dbSScott Long 2544c7070dbSScott LongMETHOD int tx_queues_alloc { 2554c7070dbSScott Long if_ctx_t _ctx; 2564c7070dbSScott Long caddr_t *_vaddrs; 2574c7070dbSScott Long uint64_t *_paddrs; 2584c7070dbSScott Long int ntxqs; 2594c7070dbSScott Long int ntxqsets; 2604c7070dbSScott Long}; 2614c7070dbSScott Long 2624c7070dbSScott LongMETHOD int rx_queues_alloc { 2634c7070dbSScott Long if_ctx_t _ctx; 2644c7070dbSScott Long caddr_t *_vaddrs; 2654c7070dbSScott Long uint64_t *_paddrs; 2664c7070dbSScott Long int nrxqs; 2674c7070dbSScott Long int nrxqsets; 2684c7070dbSScott Long}; 2694c7070dbSScott Long 2704c7070dbSScott LongMETHOD void queues_free { 2714c7070dbSScott Long if_ctx_t _ctx; 27209f6ff4fSMatt Macy} DEFAULT null_void_op; 27309f6ff4fSMatt Macy 27409f6ff4fSMatt MacyMETHOD void rx_clset { 27509f6ff4fSMatt Macy if_ctx_t _ctx; 27609f6ff4fSMatt Macy uint16_t _fl; 27709f6ff4fSMatt Macy uint16_t _qsetid; 27809f6ff4fSMatt Macy caddr_t *_sdcl; 27909f6ff4fSMatt Macy} DEFAULT null_rx_clset; 2804c7070dbSScott Long 2814c7070dbSScott Long# 2824c7070dbSScott Long# interface reset / stop 2834c7070dbSScott Long# 2844c7070dbSScott Long 2854c7070dbSScott LongMETHOD void init { 2864c7070dbSScott Long if_ctx_t _ctx; 2874c7070dbSScott Long}; 2884c7070dbSScott Long 2894c7070dbSScott LongMETHOD void stop { 2904c7070dbSScott Long if_ctx_t _ctx; 2914c7070dbSScott Long}; 2924c7070dbSScott Long 2934c7070dbSScott Long# 2944c7070dbSScott Long# interrupt setup and manipulation 2954c7070dbSScott Long# 2964c7070dbSScott Long 2974c7070dbSScott LongMETHOD int msix_intr_assign { 2984c7070dbSScott Long if_ctx_t _sctx; 2994c7070dbSScott Long int msix; 30009f6ff4fSMatt Macy} DEFAULT null_int_int_op; 3014c7070dbSScott Long 3024c7070dbSScott LongMETHOD void intr_enable { 3034c7070dbSScott Long if_ctx_t _ctx; 3044c7070dbSScott Long}; 3054c7070dbSScott Long 3064c7070dbSScott LongMETHOD void intr_disable { 3074c7070dbSScott Long if_ctx_t _ctx; 3084c7070dbSScott Long}; 3094c7070dbSScott Long 31095246abbSSean BrunoMETHOD int rx_queue_intr_enable { 31195246abbSSean Bruno if_ctx_t _ctx; 31295246abbSSean Bruno uint16_t _qid; 31395246abbSSean Bruno} DEFAULT null_queue_intr_enable; 31495246abbSSean Bruno 31595246abbSSean BrunoMETHOD int tx_queue_intr_enable { 3164c7070dbSScott Long if_ctx_t _ctx; 3174c7070dbSScott Long uint16_t _qid; 3184c7070dbSScott Long} DEFAULT null_queue_intr_enable; 3194c7070dbSScott Long 3204c7070dbSScott LongMETHOD void link_intr_enable { 3214c7070dbSScott Long if_ctx_t _ctx; 3224c7070dbSScott Long} DEFAULT null_void_op; 3234c7070dbSScott Long 324*09c3f04fSMarcin WojtasMETHOD void admin_completion_handle { 325*09c3f04fSMarcin Wojtas if_ctx_t _ctx; 326*09c3f04fSMarcin Wojtas} DEFAULT null_void_op; 327*09c3f04fSMarcin Wojtas 3284c7070dbSScott Long# 3294c7070dbSScott Long# interface configuration 3304c7070dbSScott Long# 3314c7070dbSScott Long 3324c7070dbSScott LongMETHOD void multi_set { 3334c7070dbSScott Long if_ctx_t _ctx; 3344c7070dbSScott Long}; 3354c7070dbSScott Long 3364c7070dbSScott LongMETHOD int mtu_set { 3374c7070dbSScott Long if_ctx_t _ctx; 3384c7070dbSScott Long uint32_t _mtu; 3394c7070dbSScott Long}; 34009f6ff4fSMatt MacyMETHOD int mac_set { 34109f6ff4fSMatt Macy if_ctx_t _ctx; 34209f6ff4fSMatt Macy const uint8_t *_mac; 34309f6ff4fSMatt Macy} DEFAULT default_mac_set; 3444c7070dbSScott Long 3454c7070dbSScott LongMETHOD void media_set{ 3464c7070dbSScott Long if_ctx_t _ctx; 3474c7070dbSScott Long} DEFAULT null_void_op; 3484c7070dbSScott Long 3494c7070dbSScott LongMETHOD int promisc_set { 3504c7070dbSScott Long if_ctx_t _ctx; 3514c7070dbSScott Long int _flags; 3524c7070dbSScott Long}; 3534c7070dbSScott Long 3544c7070dbSScott LongMETHOD void crcstrip_set { 3554c7070dbSScott Long if_ctx_t _ctx; 3564c7070dbSScott Long int _onoff; 3571248952aSSean Bruno int _strip; 3584c7070dbSScott Long}; 3594c7070dbSScott Long 3604c7070dbSScott Long# 3614c7070dbSScott Long# IOV handling 3624c7070dbSScott Long# 3634c7070dbSScott Long 3644c7070dbSScott LongMETHOD void vflr_handle { 3654c7070dbSScott Long if_ctx_t _ctx; 3664c7070dbSScott Long} DEFAULT null_void_op; 3674c7070dbSScott Long 3684c7070dbSScott LongMETHOD int iov_init { 3694c7070dbSScott Long if_ctx_t _ctx; 3704c7070dbSScott Long uint16_t num_vfs; 3714c7070dbSScott Long const nvlist_t * params; 3724c7070dbSScott Long} DEFAULT null_iov_init; 3734c7070dbSScott Long 3744c7070dbSScott LongMETHOD void iov_uninit { 3754c7070dbSScott Long if_ctx_t _ctx; 3764c7070dbSScott Long} DEFAULT null_void_op; 3774c7070dbSScott Long 3784c7070dbSScott LongMETHOD int iov_vf_add { 3794c7070dbSScott Long if_ctx_t _ctx; 3804c7070dbSScott Long uint16_t num_vfs; 3814c7070dbSScott Long const nvlist_t * params; 3824c7070dbSScott Long} DEFAULT null_vf_add; 3834c7070dbSScott Long 3844c7070dbSScott Long 3854c7070dbSScott Long# 3864c7070dbSScott Long# Device status 3874c7070dbSScott Long# 3884c7070dbSScott Long 3894c7070dbSScott LongMETHOD void update_admin_status { 3904c7070dbSScott Long if_ctx_t _ctx; 3914c7070dbSScott Long}; 3924c7070dbSScott Long 3934c7070dbSScott LongMETHOD void media_status { 3944c7070dbSScott Long if_ctx_t _ctx; 3954c7070dbSScott Long struct ifmediareq *_ifm; 39609f6ff4fSMatt Macy} DEFAULT null_media_status; 3974c7070dbSScott Long 3984c7070dbSScott LongMETHOD int media_change { 3994c7070dbSScott Long if_ctx_t _ctx; 40009f6ff4fSMatt Macy} DEFAULT null_int_op; 4014c7070dbSScott Long 4024c7070dbSScott LongMETHOD uint64_t get_counter { 4034c7070dbSScott Long if_ctx_t _ctx; 4044c7070dbSScott Long ift_counter cnt; 4054c7070dbSScott Long}; 4064c7070dbSScott Long 4074c7070dbSScott LongMETHOD int priv_ioctl { 4084c7070dbSScott Long if_ctx_t _ctx; 4094c7070dbSScott Long u_long _cmd; 4104c7070dbSScott Long caddr_t _data; 4114c7070dbSScott Long} DEFAULT null_priv_ioctl; 4124c7070dbSScott Long 4134c7070dbSScott Long# 4144c7070dbSScott Long# optional methods 4154c7070dbSScott Long# 4164c7070dbSScott Long 4174c7070dbSScott LongMETHOD int i2c_req { 4184c7070dbSScott Long if_ctx_t _ctx; 4194c7070dbSScott Long struct ifi2creq *_req; 4204c7070dbSScott Long} DEFAULT null_i2c_req; 4214c7070dbSScott Long 4224c7070dbSScott LongMETHOD int txq_setup { 4234c7070dbSScott Long if_ctx_t _ctx; 4244c7070dbSScott Long uint32_t _txqid; 4254c7070dbSScott Long} DEFAULT null_q_setup; 4264c7070dbSScott Long 4274c7070dbSScott LongMETHOD int rxq_setup { 4284c7070dbSScott Long if_ctx_t _ctx; 4294c7070dbSScott Long uint32_t _txqid; 4304c7070dbSScott Long} DEFAULT null_q_setup; 4314c7070dbSScott Long 4324c7070dbSScott LongMETHOD void timer { 4334c7070dbSScott Long if_ctx_t _ctx; 4344c7070dbSScott Long uint16_t _txqid; 4354c7070dbSScott Long} DEFAULT null_timer_op; 4364c7070dbSScott Long 4374c7070dbSScott LongMETHOD void watchdog_reset { 4384c7070dbSScott Long if_ctx_t _ctx; 4394c7070dbSScott Long} DEFAULT null_void_op; 4404c7070dbSScott Long 44109f6ff4fSMatt MacyMETHOD void watchdog_reset_queue { 44209f6ff4fSMatt Macy if_ctx_t _ctx; 44309f6ff4fSMatt Macy uint16_t _q; 44409f6ff4fSMatt Macy} DEFAULT null_timer_op; 44509f6ff4fSMatt Macy 4464c7070dbSScott LongMETHOD void led_func { 4474c7070dbSScott Long if_ctx_t _ctx; 4484c7070dbSScott Long int _onoff; 4494c7070dbSScott Long} DEFAULT null_led_func; 4504c7070dbSScott Long 4514c7070dbSScott LongMETHOD void vlan_register { 4524c7070dbSScott Long if_ctx_t _ctx; 4534c7070dbSScott Long uint16_t _vtag; 4544c7070dbSScott Long} DEFAULT null_vlan_register_op; 4554c7070dbSScott Long 4564c7070dbSScott LongMETHOD void vlan_unregister { 4574c7070dbSScott Long if_ctx_t _ctx; 4584c7070dbSScott Long uint16_t _vtag; 4594c7070dbSScott Long} DEFAULT null_vlan_register_op; 4604c7070dbSScott Long 4614c7070dbSScott LongMETHOD int sysctl_int_delay { 4624c7070dbSScott Long if_ctx_t _sctx; 4634c7070dbSScott Long if_int_delay_info_t _iidi; 4644c7070dbSScott Long} DEFAULT null_sysctl_int_delay; 4654c7070dbSScott Long 46695246abbSSean BrunoMETHOD void debug { 46795246abbSSean Bruno if_ctx_t _ctx; 46895246abbSSean Bruno} DEFAULT null_void_op; 46945818bf1SEric Joyner 47045818bf1SEric JoynerMETHOD bool needs_restart { 47145818bf1SEric Joyner if_ctx_t _ctx; 47245818bf1SEric Joyner enum iflib_restart_event _event; 47345818bf1SEric Joyner} DEFAULT null_needs_restart; 474