1/*- 2 * Copyright (c) 1995, 1996 3 * Matt Thomas <matt@3am-software.com>. All rights reserved. 4 * Copyright (c) 1982, 1989, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp |
36 * $FreeBSD: head/sys/net/if_fddisubr.c 177599 2008-03-25 09:39:02Z ru $ |
37 */ 38 39#include "opt_atalk.h" 40#include "opt_inet.h" 41#include "opt_inet6.h" 42#include "opt_ipx.h" 43#include "opt_mac.h" 44 --- 154 unchanged lines hidden (view full) --- 199 /* 200 * In the phase 2 case, we need to prepend an mbuf for the llc header. 201 * Since we must preserve the value of m, which is passed to us by 202 * value, we m_copy() the first mbuf, and use it for our llc header. 203 */ 204 if (aa->aa_flags & AFA_PHASE2) { 205 struct llc llc; 206 |
207 M_PREPEND(m, LLC_SNAPFRAMELEN, M_WAIT); |
208 llc.llc_dsap = llc.llc_ssap = LLC_SNAP_LSAP; 209 llc.llc_control = LLC_UI; 210 bcopy(at_org_code, llc.llc_snap.org_code, sizeof(at_org_code)); 211 llc.llc_snap.ether_type = htons(ETHERTYPE_AT); 212 bcopy(&llc, mtod(m, caddr_t), LLC_SNAPFRAMELEN); 213 type = 0; 214 } else { 215 type = htons(ETHERTYPE_AT); --- 572 unchanged lines hidden --- |