if_loop.c (3cb73e3d8bda8e0865ce4521cb3c6fd4d195f10f) | if_loop.c (fe89fae1665b092c4e0f25ba9be87e710b213fee) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 124 unchanged lines hidden (view full) --- 133 return (ENOSPC); 134 135 if_initname(ifp, ifc->ifc_name, unit); 136 ifp->if_mtu = LOMTU; 137 ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST; 138 ifp->if_ioctl = loioctl; 139 ifp->if_output = looutput; 140 ifp->if_snd.ifq_maxlen = ifqmaxlen; | 1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 124 unchanged lines hidden (view full) --- 133 return (ENOSPC); 134 135 if_initname(ifp, ifc->ifc_name, unit); 136 ifp->if_mtu = LOMTU; 137 ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST; 138 ifp->if_ioctl = loioctl; 139 ifp->if_output = looutput; 140 ifp->if_snd.ifq_maxlen = ifqmaxlen; |
141 ifp->if_hwassist = ifp->if_capabilities = ifp->if_capenable = 142 IFCAP_HWCSUM; | 141 ifp->if_capabilities = ifp->if_capenable = IFCAP_HWCSUM; 142 ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP; |
143 if_attach(ifp); 144 bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); 145 if (V_loif == NULL) 146 V_loif = ifp; 147 148 return (0); 149} 150 --- 269 unchanged lines hidden --- | 143 if_attach(ifp); 144 bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); 145 if (V_loif == NULL) 146 V_loif = ifp; 147 148 return (0); 149} 150 --- 269 unchanged lines hidden --- |