Changeset 9a6bdbc for lib/format_dag25.c
- Timestamp:
- 01/07/19 10:35:07 (2 years ago)
- Branches:
- develop
- Children:
- 51276bd
- Parents:
- 979ab1a0
- git-author:
- Jacob Van Walraven <jcv9@…> (12/14/18 09:31:48)
- git-committer:
- Jacob Van Walraven <jcv9@…> (01/07/19 10:35:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_dag25.c
r8c5c550 r9a6bdbc 174 174 * many times or close a device that we're still using */ 175 175 struct dag_dev_t *open_dags = NULL; 176 177 static bool dag_can_write(libtrace_packet_t *packet) { 178 /* Get the linktype */ 179 libtrace_linktype_t ltype = trace_get_link_type(packet); 180 181 if (ltype == TRACE_TYPE_ERF_META 182 || ltype == TRACE_TYPE_NONDATA) { 183 184 return false; 185 } 186 187 return true; 188 } 176 189 177 190 /* Returns the amount of padding between the ERF header and the start of the … … 1186 1199 static int dag_write_packet(libtrace_out_t *libtrace, libtrace_packet_t *packet) 1187 1200 { 1201 /* Check dag can write this type of packet */ 1202 if (!dag_can_write(packet)) { 1203 return 0; 1204 } 1205 1188 1206 /* This is heavily borrowed from erf_write_packet(). Yes, CnP 1189 1207 * coding sucks, sorry about that. … … 1200 1218 return -1; 1201 1219 } 1202 1203 if (trace_get_link_type(packet) == TRACE_TYPE_NONDATA)1204 return 0;1205 1220 1206 1221 pad = dag_get_padding(packet);
Note: See TracChangeset
for help on using the changeset viewer.