dhcp-print.h

来自「this is sample about DHCP-agent」· C头文件 代码 · 共 80 行

H
80
字号
/* $Header: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-print.h,v 1.5 2003/05/02 02:44:52 actmodern Exp $ * * Copyright 2002 Thamer Alharbash * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. The names of the authors may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * */#ifndef DHCP_PRINT_H#define DHCP_PRINT_H/* Option print handler structure. */typedef struct {    char *prefix;    void (*handle_option) (const uint8_t *data, int len, int print_val);} option_handler;/* type for printing packet function. */typedef void (*print_packet) (rawnet_t *net);/* main printers */extern void print_dhcp_packet_verbose(rawnet_t *net);extern void print_dhcp_packet_brief(rawnet_t *net);/* Printing functions. */extern void print_dhcphdr_brief(dhcp_obj * dhcp);extern void print_dhcphdr_verbose(dhcp_obj * dhcp);extern void print_options_verbose(dhcp_obj * dhcp);extern void print_ip_verbose(ip_obj * ip);extern void print_ip_brief(ip_obj * ip);extern void print_magic_cookie_verbose(const char *valid, dhcp_obj * dhcp);extern void print_magic_cookie_brief(dhcp_obj * dhcp);extern void print_timestamp_brief(struct timeval tm);extern void print_timestamp_verbose(struct timeval tm);extern void print_eth_brief(eth_obj * eth);extern void print_eth_verbose(eth_obj * eth);/* Print utility functions. */extern void print_dhcp_type_message(const uint8_t *data, int len, int printval);extern void print_address_list(const uint8_t *data, int len, int print_val);extern void print_int32(const uint8_t *data, int len, int print_val);extern void print_string(const uint8_t *data, int len, int print_val);extern void print_uint16(const uint8_t *data, int len, int print_val);extern void print_en_bool(const uint8_t *data, int len, int print_val);extern void print_yn_bool(const uint8_t *data, int len, int print_val);extern void print_address_mask_list(const uint8_t *data, int len, int ini_val);extern void print_ubyte(const uint8_t *data, int len, int print_val);extern void print_uint16_list(const uint8_t *data, int len, int print_val);extern void print_uint32(const uint8_t *data, int len, int print_val);extern void print_netbios_node_type(const uint8_t *data, int len, int print_val);extern void print_address_route_list(const uint8_t *data, int len, int ini_val);extern void print_request_options(const uint8_t *data, int len, int printval);extern void dont_handle(const uint8_t *data, int len, int print_val);/* in dhcp-sniffer-ohandlers.c */extern option_handler option_handlers[];#endif /* DHCP_PRINT_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?