diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2006-09-04 11:04:14 +0000 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2006-09-04 11:04:14 +0000 |
commit | 76192b1c6c0d1a4b48ae990c5a0cbecb810cff01 (patch) | |
tree | 53feb69fef6383ce5c041512bc39d9f88cc0a8a9 /wiretap | |
parent | 6e040b3a8329ae4ba057b58bf65372ca5a7ba95f (diff) |
Partial implementation of UMTS FP. Currently only works with Catapult DCT2000 format files, as need extra information about packet when decoding. There are a few TODOs (notably E-DCH channels), but the current version gives OK coverage.
svn path=/trunk/; revision=19130
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/catapult_dct2000.c | 19 | ||||
-rw-r--r-- | wiretap/wtap.h | 1 |
2 files changed, 7 insertions, 13 deletions
diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c index 936c509ce7..3753b9acec 100644 --- a/wiretap/catapult_dct2000.c +++ b/wiretap/catapult_dct2000.c @@ -143,9 +143,8 @@ static void set_pseudo_header_info(wtap *wth, int pkt_encap, long file_offset, union wtap_pseudo_header *pseudo_header, - gint length, packet_direction_t direction); -static void set_aal_info(union wtap_pseudo_header *pseudo_header, gint length, +static void set_aal_info(union wtap_pseudo_header *pseudo_header, packet_direction_t direction); static void set_isdn_info(union wtap_pseudo_header *pseudo_header, packet_direction_t direction); @@ -395,7 +394,7 @@ gboolean catapult_dct2000_read(wtap *wth, int *err, gchar **err_info _U_, /* Set pseudo-header if necessary */ set_pseudo_header_info(wth, encap, this_offset, &wth->pseudo_header, - data_chars/2, direction); + direction); /* OK, we have packet details to return */ *err = errno; @@ -468,7 +467,7 @@ catapult_dct2000_seek_read(wtap *wth, long seek_off, } /* Set packet pseudo-header if necessary */ - set_pseudo_header_info(wth, encap, seek_off, pseudo_header, data_chars/2, direction); + set_pseudo_header_info(wth, encap, seek_off, pseudo_header, direction); *err = errno = 0; return TRUE; @@ -1163,7 +1162,6 @@ void set_pseudo_header_info(wtap *wth, int pkt_encap, long file_offset, union wtap_pseudo_header *pseudo_header, - gint length, packet_direction_t direction) { pseudo_header->dct2000.seek_off = file_offset; @@ -1172,7 +1170,7 @@ void set_pseudo_header_info(wtap *wth, switch (pkt_encap) { case WTAP_ENCAP_ATM_PDUS_UNTRUNCATED: - set_aal_info(pseudo_header, length, direction); + set_aal_info(pseudo_header, direction); break; case WTAP_ENCAP_ISDN: set_isdn_info(pseudo_header, direction); @@ -1191,8 +1189,7 @@ void set_pseudo_header_info(wtap *wth, /*********************************************/ /* Fill in atm pseudo-header with known info */ /*********************************************/ -void set_aal_info(union wtap_pseudo_header *pseudo_header, gint length, - packet_direction_t direction) +void set_aal_info(union wtap_pseudo_header *pseudo_header, packet_direction_t direction) { /* 'aal_head_chars' has this format (for AAL2 at least): Global Flow Control (4 bits) | VPI (8 bits) | VCI (16 bits) | @@ -1212,7 +1209,7 @@ void set_aal_info(union wtap_pseudo_header *pseudo_header, gint length, /* Assume always AAL2 for FP */ pseudo_header->dct2000.inner_pseudo_header.atm.aal = AAL_2; - pseudo_header->dct2000.inner_pseudo_header.atm.type = TRAF_UNKNOWN; + pseudo_header->dct2000.inner_pseudo_header.atm.type = TRAF_UMTS_FP; pseudo_header->dct2000.inner_pseudo_header.atm.subtype = TRAF_ST_UNKNOWN; /* vpi is 8 bits (2nd & 3rd nibble) */ @@ -1229,10 +1226,6 @@ void set_aal_info(union wtap_pseudo_header *pseudo_header, gint length, /* 0 means we don't know how many cells the frame comprises. */ pseudo_header->dct2000.inner_pseudo_header.atm.cells = 0; - - pseudo_header->dct2000.inner_pseudo_header.atm.aal5t_u2u = 0; - pseudo_header->dct2000.inner_pseudo_header.atm.aal5t_len = length; - pseudo_header->dct2000.inner_pseudo_header.atm.aal5t_chksum = 0; } diff --git a/wiretap/wtap.h b/wiretap/wtap.h index e1aee9ffc3..6f63a76d18 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -318,6 +318,7 @@ struct isdn_phdr { #define TRAF_FR 5 /* Frame Relay */ #define TRAF_SPANS 6 /* FORE SPANS */ #define TRAF_IPSILON 7 /* Ipsilon */ +#define TRAF_UMTS_FP 8 /* UMTS Frame Protocol */ /* * Traffic subtypes. |