The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
server_dump.h File Reference

Functions for server-side dumping of LLDP and CDP packets. More...

#include <projectcommon.h>
Include dependency graph for server_dump.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

WINEXPORT void dump_cdp_packet (const void *packet, const void *packend)
 Dump out a CDP packet - not very intelligently. More...
 
WINEXPORT void dump_lldp_packet (const void *packet, const void *packend)
 Dump an LLDP packet to stdout. More...
 
WINEXPORT gboolean is_all_ascii (const void *mem, const void *end)
 return TRUE if this memory is all printable ASCII More...
 
WINEXPORT void dump_mem (const void *start, const void *end)
 Dump out memory. More...
 

Detailed Description

Functions for server-side dumping of LLDP and CDP packets.

This file is part of the Assimilation Project.

Author
Copyright © 2011, 2012 - Alan Robertson alanr.nosp@m.@uni.nosp@m.x.sh
The Assimilation software is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Assimilation software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the Assimilation Project software. If not, see http://www.gnu.org/licenses/

Definition in file server_dump.h.

Function Documentation

void dump_cdp_packet ( const void *  vpacket,
const void *  vpktend 
)

Dump out a CDP packet - not very intelligently.

Parameters
[in]vpacketPointer to a the start of a CDP packet
[in]vpktendPointer of first byte past end of CDP packet

Definition at line 87 of file cdp.c.

References dump_mem(), get_cdp_cksum(), get_cdp_ttl(), get_cdp_type_string(), get_cdp_vers(), get_cdptlv_body(), get_cdptlv_first(), get_cdptlv_next(), get_cdptlv_type(), get_cdptlv_vlen(), and is_valid_cdp_packet().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void dump_lldp_packet ( const void *  tlv_vpv,
const void *  tlv_vpendv 
)

Dump an LLDP packet to stdout.

Parameters
[in]tlv_vpvPointer to the first byte of the packet
[in]tlv_vpendvPointer to the first byte past the end of the packet

Definition at line 120 of file lldp.c.

References dump_mem(), get_lldp_type_string(), get_lldptlv_body(), get_lldptlv_first(), get_lldptlv_len(), get_lldptlv_next(), get_lldptlv_type(), get_oui(), get_oui_string(), is_valid_lldp_packet(), LLDP_TLV_ORG_SPECIFIC, and oui.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

WINEXPORT void dump_mem ( const void *  start,
const void *  end 
)

Dump out memory.

Definition at line 60 of file dump.c.

References is_all_ascii().

Referenced by dump_cdp_packet(), dump_lldp_packet(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

WINEXPORT gboolean is_all_ascii ( const void *  mem,
const void *  end 
)

return TRUE if this memory is all printable ASCII

Definition at line 36 of file dump.c.

Referenced by dump_mem().

Here is the caller graph for this function: