print-domain.c (146778) | print-domain.c (147904) |
---|---|
1/* 2 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 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: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 4 unchanged lines hidden (view full) --- 13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 * the University nor the names of its contributors may be used to endorse 15 * or promote products derived from this software without specific prior 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 * | 1/* 2 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 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: (1) source code distributions 7 * retain the above copyright notice and this paragraph in its entirety, (2) 8 * distributions including binary code include the above copyright notice and --- 4 unchanged lines hidden (view full) --- 13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 14 * the University nor the names of its contributors may be used to endorse 15 * or promote products derived from this software without specific prior 16 * written permission. 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 * |
21 * $FreeBSD: head/contrib/tcpdump/print-domain.c 146778 2005-05-29 19:09:28Z sam $ | 21 * $FreeBSD: head/contrib/tcpdump/print-domain.c 147904 2005-07-11 04:14:02Z sam $ |
22 */ 23 24#ifndef lint 25static const char rcsid[] _U_ = | 22 */ 23 24#ifndef lint 25static const char rcsid[] _U_ = |
26 "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.89 2004/03/23 19:03:03 fenner Exp $ (LBL)"; | 26 "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.89.2.1 2005/04/20 20:59:00 guy Exp $ (LBL)"; |
27#endif 28 29#ifdef HAVE_CONFIG_H 30#include "config.h" 31#endif 32 33#include <tcpdump-stdinc.h> 34 --- 93 unchanged lines hidden (view full) --- 128{ 129 register u_int i; 130 131 if (!TTEST2(*cp, 1)) 132 return(-1); 133 i = *cp; 134 if ((i & INDIR_MASK) == EDNS0_MASK) { 135 int bitlen, elt; | 27#endif 28 29#ifdef HAVE_CONFIG_H 30#include "config.h" 31#endif 32 33#include <tcpdump-stdinc.h> 34 --- 93 unchanged lines hidden (view full) --- 128{ 129 register u_int i; 130 131 if (!TTEST2(*cp, 1)) 132 return(-1); 133 i = *cp; 134 if ((i & INDIR_MASK) == EDNS0_MASK) { 135 int bitlen, elt; |
136 137 if ((elt = (i & ~INDIR_MASK)) != EDNS0_ELT_BITLABEL) | 136 if ((elt = (i & ~INDIR_MASK)) != EDNS0_ELT_BITLABEL) { 137 printf("<ELT %d>", elt); |
138 return(-1); | 138 return(-1); |
139 } |
|
139 if (!TTEST2(*(cp + 1), 1)) 140 return(-1); 141 if ((bitlen = *(cp + 1)) == 0) 142 bitlen = 256; 143 return(((bitlen + 7) / 8) + 1); 144 } else 145 return(i); 146} --- 553 unchanged lines hidden --- | 140 if (!TTEST2(*(cp + 1), 1)) 141 return(-1); 142 if ((bitlen = *(cp + 1)) == 0) 143 bitlen = 256; 144 return(((bitlen + 7) / 8) + 1); 145 } else 146 return(i); 147} --- 553 unchanged lines hidden --- |