Changeset 00c1935


Ignore:
Timestamp:
02/25/05 11:22:04 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
627dbe9
Parents:
aca3ff4
Message:

added in some missing consts

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h

    r68667ee r00c1935  
    232232 * this is
    233233 */
    234 void *trace_get_link(struct libtrace_packet_t *packet);
     234void *trace_get_link(const struct libtrace_packet_t *packet);
    235235
    236236/** get a pointer to the IP header (if any)
     
    400400 * @author Perry Lorier
    401401 */
    402 uint8_t *trace_get_source_mac(const, struct libtrace_packet_t *packet);
     402uint8_t *trace_get_source_mac(const struct libtrace_packet_t *packet);
    403403
    404404/** Truncate the packet at the suggested length
  • lib/trace.c

    r68667ee r00c1935  
    815815 * you should call trace_get_link_type() to find out what type of link layer this is
    816816 */
    817 void *trace_get_link(struct libtrace_packet_t *packet) {
     817void *trace_get_link(const struct libtrace_packet_t *packet) {
    818818        void *ethptr = 0;
    819819       
     
    10961096 * @author Daniel Lawson
    10971097 */
    1098 uint64_t trace_get_erf_timestamp(struct libtrace_packet_t *packet) {
     1098uint64_t trace_get_erf_timestamp(const struct libtrace_packet_t *packet) {
    10991099        uint64_t timestamp = 0;
    11001100        dag_record_t *erfptr = 0;
     
    11381138 * @author Perry Lorier
    11391139 */
    1140 struct timeval trace_get_timeval(struct libtrace_packet_t *packet) {
     1140struct timeval trace_get_timeval(const struct libtrace_packet_t *packet) {
    11411141        struct timeval tv;
    11421142#if HAVE_PCAP
     
    11791179 * @author Perry Lorier
    11801180 */
    1181 double trace_get_seconds(struct libtrace_packet_t *packet) {
     1181double trace_get_seconds(const struct libtrace_packet_t *packet) {
    11821182        uint64_t ts;
    11831183        ts = trace_get_erf_timestamp(packet);
     
    11961196 *  This is sometimes called the "snaplen".
    11971197 */
    1198 int trace_get_capture_length(struct libtrace_packet_t *packet) {
     1198int trace_get_capture_length(const struct libtrace_packet_t *packet) {
    11991199        dag_record_t *erfptr = 0;
    12001200#if HAVE_PCAP
     
    12421242 * not be the same as the Capture Len.
    12431243 */
    1244 int trace_get_wire_length(struct libtrace_packet_t *packet){
     1244int trace_get_wire_length(const struct libtrace_packet_t *packet){
    12451245        dag_record_t *erfptr = 0;
    12461246#if HAVE_PCAP
     
    12821282 * @author Daniel Lawson
    12831283 */
    1284 libtrace_linktype_t trace_get_link_type(struct libtrace_packet_t *packet ) {
     1284libtrace_linktype_t trace_get_link_type(const struct libtrace_packet_t *packet ) {
    12851285        dag_record_t *erfptr = 0;
    12861286#if HAVE_PCAP
     
    13281328 * @author Perry Lorier
    13291329 */
    1330 uint8_t *trace_get_source_mac(struct libtrace_packet_t *packet) {
     1330uint8_t *trace_get_source_mac(const struct libtrace_packet_t *packet) {
    13311331        void *link = trace_get_link(packet);
    13321332        struct ieee_802_11_header *wifi = link;
     
    13511351 * @author Perry Lorier
    13521352 */
    1353 uint8_t *trace_get_destination_mac(struct libtrace_packet_t *packet) {
     1353uint8_t *trace_get_destination_mac(const struct libtrace_packet_t *packet) {
    13541354        void *link = trace_get_link(packet);
    13551355        struct ieee_802_11_header *wifi = link;
     
    15661566 * @author Daniel Lawson
    15671567 */
    1568 int8_t trace_get_direction(struct libtrace_packet_t *packet) {
     1568int8_t trace_get_direction(const struct libtrace_packet_t *packet) {
    15691569       
    15701570        int8_t direction;
Note: See TracChangeset for help on using the changeset viewer.