Deleted Added
full compact
mp.c (46686) mp.c (47061)
1/*-
2 * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org>
3 * 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org>
3 * 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: mp.c,v 1.18 1999/01/28 01:56:33 brian Exp $
26 * $Id: mp.c,v 1.19 1999/05/08 11:07:17 brian Exp $
27 */
28
29#include <sys/param.h>
30#include <netinet/in.h>
31#include <netinet/in_systm.h>
32#include <netinet/ip.h>
33#include <arpa/inet.h>
34#include <net/if_dl.h>

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

485 h.end = 0; /* just in case it's a whole packet */
486 } else
487 do
488 frag = &(*frag)->next;
489 while (*frag != NULL);
490 } while (!h.end);
491
492 if (q) {
27 */
28
29#include <sys/param.h>
30#include <netinet/in.h>
31#include <netinet/in_systm.h>
32#include <netinet/ip.h>
33#include <arpa/inet.h>
34#include <net/if_dl.h>

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

485 h.end = 0; /* just in case it's a whole packet */
486 } else
487 do
488 frag = &(*frag)->next;
489 while (*frag != NULL);
490 } while (!h.end);
491
492 if (q) {
493 u_short proto;
494 u_char ch;
495
496 q = mbuf_Read(q, &ch, 1);
497 proto = ch;
498 if (!(proto & 1)) {
499 q = mbuf_Read(q, &ch, 1);
500 proto <<= 8;
501 proto += ch;
502 }
503 if (log_IsKept(LogDEBUG))
504 log_Printf(LogDEBUG, "MP: Reassembled frags %ld-%lu, length %d\n",
505 first, (u_long)h.seq, mbuf_Length(q));
506 q = mbuf_Contiguous(q);
493 q = mbuf_Contiguous(q);
494 log_Printf(LogDEBUG, "MP: Reassembled frags %ld-%lu, length %d\n",
495 first, (u_long)h.seq, mbuf_Length(q));
507 link_PullPacket(&mp->link, MBUF_CTOP(q), q->cnt, mp->bundle);
508 }
509
510 mp->seq.next_in = seq = inc_seq(mp->local_is12bit, h.seq);
511 last = NULL;
512 q = mp->inbufs;
513 } else {
514 /* Look for the next fragment */

--- 555 unchanged lines hidden ---
496 link_PullPacket(&mp->link, MBUF_CTOP(q), q->cnt, mp->bundle);
497 }
498
499 mp->seq.next_in = seq = inc_seq(mp->local_is12bit, h.seq);
500 last = NULL;
501 q = mp->inbufs;
502 } else {
503 /* Look for the next fragment */

--- 555 unchanged lines hidden ---