Re: Role of subtpe_seek_read in wth stucture

"Guy Harris" <[email protected]>
Newsgroups gmane.network.ethereal.devel
Message-ID <[email protected]>
Raman Singla wrote:
> Kindly tell me the role of having a seek_read function (while writing for
> a new capture format).

Random access to the file, which is what Ethereal does - it does *NOT*
read the entire contents of the capture file into memory, it reads the
file once, and, if it later needs to look at a particular packet, it reads
it with wtap_seek_read(), passing the seek offset of the packet in the
file as an argument.

> but what is role of wriring of seek_read & intilizing
> wth->subtype_seek_read?

See above.

> what will happen when user will operate if one not writing seek_read &
> initialing
> wth->subtype_seek_read with NULL.

Ethereal will crash when Wiretap tries to dereference the null
subtype_seek_read pointer in wtap_seek_read().
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.