aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-08-26 23:07:43 +0000
committerGuy Harris <guy@alum.mit.edu>2003-08-26 23:07:43 +0000
commit982ece89cf2d31d509dfe270578d86c62459c776 (patch)
tree85cafa179daef54d8133ade2c7bae9c56d4b7962
parentb91e76964d8d5e585c5b7e6d78859bad7d3c47d9 (diff)
From Jesper Peterson:
use WTAP_ENCAP_ATM_PDUS as the default encapsulation for ATM; don't use ULL constants, as not all C compilers that support gint64 support them, and as there's no need to make them ULL constants. svn path=/trunk/; revision=8278
-rw-r--r--wiretap/erf.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c
index 6332b3022b..6e9e2980b3 100644
--- a/wiretap/erf.c
+++ b/wiretap/erf.c
@@ -32,7 +32,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
-* $Id: erf.c,v 1.1 2003/08/26 07:10:38 guy Exp $
+* $Id: erf.c,v 1.2 2003/08/26 23:07:43 guy Exp $
*/
/*
@@ -75,7 +75,7 @@ int erf_open(wtap *wth, int *err)
guint32 i, n;
char *s;
guint32 records_for_erf_check = RECORDS_FOR_ERF_CHECK;
- guint32 atm_encap = WTAP_ENCAP_ATM_RFC1483;
+ guint32 atm_encap = WTAP_ENCAP_ATM_PDUS;
gboolean is_rawatm = FALSE;
gboolean is_ppp = FALSE;
int common_type = 0;
@@ -90,6 +90,9 @@ int erf_open(wtap *wth, int *err)
if (!strcmp(s, "sunraw")) {
atm_encap = WTAP_ENCAP_ATM_PDUS;
is_rawatm = TRUE;
+ } else
+ if (!strcmp(s, "rfc1483")) {
+ atm_encap = WTAP_ENCAP_ATM_RFC1483;
}
}
@@ -302,8 +305,8 @@ static int erf_read_header(
guint64 ts = pletohll(&erf_header->ts);
phdr->ts.tv_sec = ts >> 32;
- ts = ((ts & 0xffffffffULL) * 1000 * 1000);
- ts += (ts & 0x80000000ULL) << 1; /* rounding */
+ ts = ((ts & 0xffffffff) * 1000 * 1000);
+ ts += (ts & 0x80000000) << 1; /* rounding */
phdr->ts.tv_usec = ts >> 32;
if (phdr->ts.tv_usec >= 1000000) {
phdr->ts.tv_usec -= 1000000;