ng_UI.c (4cf49a43559ed9fdad601bdcccd2c55963008675) ng_UI.c (bef9dae05a72866e79d97d9bff3fc5a2538b4421)
1
2/*
3 * ng_UI.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

--- 164 unchanged lines hidden (view full) ---

173{
174 const node_p node = hook->node;
175 const priv_p priv = node->private;
176 int error = 0;
177
178 if (hook == priv->downlink) {
179 u_char *start, *ptr;
180
1
2/*
3 * ng_UI.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

--- 164 unchanged lines hidden (view full) ---

173{
174 const node_p node = hook->node;
175 const priv_p priv = node->private;
176 int error = 0;
177
178 if (hook == priv->downlink) {
179 u_char *start, *ptr;
180
181 if (!m || !(m = m_pullup(m, MAX_ENCAPS_HDR)))
181 if (!m || (m->m_len < MAX_ENCAPS_HDR
182 && !(m = m_pullup(m, MAX_ENCAPS_HDR))))
182 ERROUT(ENOBUFS);
183 ptr = start = mtod(m, u_char *);
184
185 /* Must be UI frame */
186 if (*ptr++ != HDLC_UI)
187 ERROUT(0);
188
189 m_adj(m, ptr - start);

--- 53 unchanged lines hidden ---
183 ERROUT(ENOBUFS);
184 ptr = start = mtod(m, u_char *);
185
186 /* Must be UI frame */
187 if (*ptr++ != HDLC_UI)
188 ERROUT(0);
189
190 m_adj(m, ptr - start);

--- 53 unchanged lines hidden ---