OpenOffline opens a file and returns its contents as a *Handle. Depending on libpcap support and on the timestamp resolution used in the file, nanosecond or microsecond resolution is used internally. All returned timestamps are scaled to nanosecond resolution. Resolution() can be used to query the a
(file string)
| 184 | // internally. All returned timestamps are scaled to nanosecond resolution. Resolution() can be used |
| 185 | // to query the actual resolution used. |
| 186 | func OpenOffline(file string) (handle *Handle, err error) { |
| 187 | handle, err = openOffline(file) |
| 188 | if err != nil { |
| 189 | return |
| 190 | } |
| 191 | if pcapGetTstampPrecision(handle.cptr) == pcapTstampPrecisionNano { |
| 192 | handle.nanoSecsFactor = 1 |
| 193 | } else { |
| 194 | handle.nanoSecsFactor = 1000 |
| 195 | } |
| 196 | return |
| 197 | } |
| 198 | |
| 199 | // OpenOfflineFile returns contents of input file as a *Handle. Depending on libpcap support and |
| 200 | // on the timestamp resolution used in the file, nanosecond or microsecond resolution is used |
searching dependent graphs…