Ethereal-dev: [Ethereal-dev] new accessors

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Ronnie Sahlberg" <rsahlber@xxxxxxxxxxxxxx>
Date: Sat, 16 Jun 2001 14:35:50 +1000
Hi,

Before I start coding. Would a patch that added accessors similar to
ipv4_t *tvb_get_ipv4(tvbuff_t *tvb, int offset, ipv4_t *buf)
ipv6_t *tvb_get_ipv6(tvbuff_t *tvb, int offset, ipv6_t *buf)
ether_t *tvb_get_ether(tvbuff_t *tvb, inf offset, ether_t *buf)
to tvbuff.c be considered?

Accessing these types are the majority of cases where the lack of a accessor
forces the dissectors to call tvb_get_ptr() instead.

A patch like this could then be followed with incremental patches to the
dissectors where
these accessors could be used instead of the tvb_get_ptr() calls.

Most likely, there will also be other common types which also lacks an
accessor which can be added.