📄 dhcp-sniffer-ohandlers.c
字号:
/* $Header: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-sniffer-ohandlers.c,v 1.3 2002/11/16 00:23:44 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. * */#include "dhcp-local.h"#include "dhcp-libutil.h"#include "dhcp-librawnet.h"#include "dhcp-print.h"/* There are 63 DHCP options we handle, * only 61 of them are handled with actual routines. * * Tag values on the right. * */option_handler option_handlers[] = { {NULL, NULL,} , /* 0: Pad: don't handle it here. */ {"Subnet Mask", print_address_list} , /* 1 */ {"Time Offset", print_int32} , /* 2 */ {"Routers", print_address_list} , /* 3 */ {"Time Servers", print_address_list} , /* 4 */ {"Name Servers", print_address_list} , /* 5 */ {"Domain Name Servers", print_address_list} , /* 6 */ {"Log Servers", print_address_list} , /* 7 */ {"Cookie Servers", print_address_list} , /* 8 */ {"LPR Servers", print_address_list} , /* 9 */ {"Impress Servers", print_address_list} , /* 10 */ {"RL servers", print_address_list} , /* 11 */ {"Hostname", print_string} , /* 12 */ {"Boot File Size", print_uint16} , /* 13 */ {"Merit Dump File", print_string} , /* 14 */ {"Domain Name", print_string} , /* 15 */ {"Swap Server", print_address_list} , /* 16 */ {"Root Path", print_string} , /* 17 */ {"Extensions Path", print_string} , /* 18 */ {"IP Forwarding", print_en_bool} , /* 19 */ {"Source Routing", print_en_bool} , /* 20 */ {"Policy Filter", print_address_mask_list} , /* 21 */ {"Maximum DGRAM Reassmbly", print_uint16} , /* 22 */ {"Default IP Time-to-live", print_ubyte} , /* 23 */ {"Path MTU Aging Timeout", print_uint32} , /* 24 */ {"Path MTU Plateau Table", print_uint16_list} , /* 25 */ {"Interface MTU", print_uint16} , /* 26 */ {"All Subnets", print_yn_bool} , /* 27 */ {"Broadcast Address", print_address_list} , /* 28 */ {"Perform Mask Discovery", print_yn_bool} , /* 29 */ {"Mask Supplier", print_yn_bool} , /* 30 */ {"Perform Router Discovery", print_yn_bool} , /* 31 */ {"Router Solicitation Address", print_address_list} , /* 32 */ {"Static Route", print_address_route_list} , /* 33 */ {"Trailer Encapsulation", print_yn_bool} , /* 34 */ {"ARP Cache Timeout", print_uint32} , /* 35 */ {"Ethernet Encapsulation", print_yn_bool} , /* 36 */ {"TCP Default TTL", print_ubyte} , /* 37 */ {"TCP KeepAlive Interval", print_uint32} , /* 38 */ {"TCP KeepAlive Garbage", print_yn_bool} , /* 39 */ {"Network Information Service Domain", print_string} , /* 40 */ {"Network Information Servers", print_address_list} , /* 41 */ {"Network Time Protocol Servers", print_address_list} , /* 42 */ {"Vendor Specific Information", dont_handle} , /* 43 */ {"NetBIOS over TCP/IP Name Servers", print_address_list} , /* 44 */ {"NetBIOS over TCP/IP Datagram Distribution Servers", print_address_list} , /* 45 */ {"NetBIOS over TCP/IP Node Type", print_netbios_node_type} , /* 46 */ {"NetBIOS over TCP/IP Scope", dont_handle} , /* 47 */ {"X-Windows Font Servers", print_address_list} , /* 48 */ {"X-Windows System Display Manager", print_address_list} , /* 49 */ {"Request IP Address", print_address_list} , /* 50 */ {"IP Address Lease Time", print_uint32} , /* 51 */ {"Option Overload", dont_handle} , /* 52 */ {"DHCP Message Type", print_dhcp_type_message} , /* 53 */ {"Server Identifier", print_address_list} , /* 54 */ {"Parameter Request List", print_request_options} , /* 55 */ {"Message", print_string} , /* 56 */ {"Max DHP Message Size", print_uint16} , /* 57 */ {"Renewal Time", print_uint32} , /* 58 */ {"Rebinding Time", print_uint32} , /* 59 */ {"Class ID", dont_handle} , /* 60 */ {"Client ID", dont_handle} , /* 61 */};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -