📄 wksrecord.java
字号:
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)package org.xbill.DNS;import java.net.*;import java.io.*;import java.util.*;/** * Well Known Services - Lists services offered by this host. * * @author Brian Wellington */public class WKSRecord extends Record {public static class Protocol { /** * IP protocol identifiers. This is basically copied out of RFC 1010. */ private Protocol() {} /** Internet Control Message */ public static final int ICMP = 1; /** Internet Group Management */ public static final int IGMP = 2; /** Gateway-to-Gateway */ public static final int GGP = 3; /** Stream */ public static final int ST = 5; /** Transmission Control */ public static final int TCP = 6; /** UCL */ public static final int UCL = 7; /** Exterior Gateway Protocol */ public static final int EGP = 8; /** any private interior gateway */ public static final int IGP = 9; /** BBN RCC Monitoring */ public static final int BBN_RCC_MON = 10; /** Network Voice Protocol */ public static final int NVP_II = 11; /** PUP */ public static final int PUP = 12; /** ARGUS */ public static final int ARGUS = 13; /** EMCON */ public static final int EMCON = 14; /** Cross Net Debugger */ public static final int XNET = 15; /** Chaos */ public static final int CHAOS = 16; /** User Datagram */ public static final int UDP = 17; /** Multiplexing */ public static final int MUX = 18; /** DCN Measurement Subsystems */ public static final int DCN_MEAS = 19; /** Host Monitoring */ public static final int HMP = 20; /** Packet Radio Measurement */ public static final int PRM = 21; /** XEROX NS IDP */ public static final int XNS_IDP = 22; /** Trunk-1 */ public static final int TRUNK_1 = 23; /** Trunk-2 */ public static final int TRUNK_2 = 24; /** Leaf-1 */ public static final int LEAF_1 = 25; /** Leaf-2 */ public static final int LEAF_2 = 26; /** Reliable Data Protocol */ public static final int RDP = 27; /** Internet Reliable Transaction */ public static final int IRTP = 28; /** ISO Transport Protocol Class 4 */ public static final int ISO_TP4 = 29; /** Bulk Data Transfer Protocol */ public static final int NETBLT = 30; /** MFE Network Services Protocol */ public static final int MFE_NSP = 31; /** MERIT Internodal Protocol */ public static final int MERIT_INP = 32; /** Sequential Exchange Protocol */ public static final int SEP = 33; /** CFTP */ public static final int CFTP = 62; /** SATNET and Backroom EXPAK */ public static final int SAT_EXPAK = 64; /** MIT Subnet Support */ public static final int MIT_SUBNET = 65; /** MIT Remote Virtual Disk Protocol */ public static final int RVD = 66; /** Internet Pluribus Packet Core */ public static final int IPPC = 67; /** SATNET Monitoring */ public static final int SAT_MON = 69; /** Internet Packet Core Utility */ public static final int IPCV = 71; /** Backroom SATNET Monitoring */ public static final int BR_SAT_MON = 76; /** WIDEBAND Monitoring */ public static final int WB_MON = 78; /** WIDEBAND EXPAK */ public static final int WB_EXPAK = 79; private static Mnemonic protocols = new Mnemonic("IP protocol", Mnemonic.CASE_LOWER); static { protocols.setMaximum(0xFF); protocols.setNumericAllowed(true); protocols.add(ICMP, "icmp"); protocols.add(IGMP, "igmp"); protocols.add(GGP, "ggp"); protocols.add(ST, "st"); protocols.add(TCP, "tcp"); protocols.add(UCL, "ucl"); protocols.add(EGP, "egp"); protocols.add(IGP, "igp"); protocols.add(BBN_RCC_MON, "bbn-rcc-mon"); protocols.add(NVP_II, "nvp-ii"); protocols.add(PUP, "pup"); protocols.add(ARGUS, "argus"); protocols.add(EMCON, "emcon"); protocols.add(XNET, "xnet"); protocols.add(CHAOS, "chaos"); protocols.add(UDP, "udp"); protocols.add(MUX, "mux"); protocols.add(DCN_MEAS, "dcn-meas"); protocols.add(HMP, "hmp"); protocols.add(PRM, "prm"); protocols.add(XNS_IDP, "xns-idp"); protocols.add(TRUNK_1, "trunk-1"); protocols.add(TRUNK_2, "trunk-2"); protocols.add(LEAF_1, "leaf-1"); protocols.add(LEAF_2, "leaf-2"); protocols.add(RDP, "rdp"); protocols.add(IRTP, "irtp"); protocols.add(ISO_TP4, "iso-tp4"); protocols.add(NETBLT, "netblt"); protocols.add(MFE_NSP, "mfe-nsp"); protocols.add(MERIT_INP, "merit-inp"); protocols.add(SEP, "sep"); protocols.add(CFTP, "cftp"); protocols.add(SAT_EXPAK, "sat-expak"); protocols.add(MIT_SUBNET, "mit-subnet"); protocols.add(RVD, "rvd"); protocols.add(IPPC, "ippc"); protocols.add(SAT_MON, "sat-mon"); protocols.add(IPCV, "ipcv"); protocols.add(BR_SAT_MON, "br-sat-mon"); protocols.add(WB_MON, "wb-mon"); protocols.add(WB_EXPAK, "wb-expak"); } /** * Converts an IP protocol value into its textual representation */ public static String string(int type) { return protocols.getText(type); } /** * Converts a textual representation of an IP protocol into its * numeric code. Integers in the range 0..255 are also accepted. * @param s The textual representation of the protocol * @return The protocol code, or -1 on error. */ public static int value(String s) { return protocols.getValue(s); }}public static class Service { /** * TCP/UDP services. This is basically copied out of RFC 1010, * with MIT-ML-DEV removed, as it is not unique, and the description * of SWIFT-RVF fixed. */ private Service() {} /** Remote Job Entry */ public static final int RJE = 5; /** Echo */ public static final int ECHO = 7; /** Discard */ public static final int DISCARD = 9; /** Active Users */ public static final int USERS = 11; /** Daytime */ public static final int DAYTIME = 13; /** Quote of the Day */ public static final int QUOTE = 17; /** Character Generator */ public static final int CHARGEN = 19; /** File Transfer [Default Data] */ public static final int FTP_DATA = 20; /** File Transfer [Control] */ public static final int FTP = 21; /** Telnet */ public static final int TELNET = 23; /** Simple Mail Transfer */ public static final int SMTP = 25; /** NSW User System FE */ public static final int NSW_FE = 27; /** MSG ICP */ public static final int MSG_ICP = 29; /** MSG Authentication */ public static final int MSG_AUTH = 31; /** Display Support Protocol */ public static final int DSP = 33; /** Time */ public static final int TIME = 37; /** Resource Location Protocol */ public static final int RLP = 39; /** Graphics */ public static final int GRAPHICS = 41; /** Host Name Server */ public static final int NAMESERVER = 42; /** Who Is */ public static final int NICNAME = 43; /** MPM FLAGS Protocol */ public static final int MPM_FLAGS = 44; /** Message Processing Module [recv] */ public static final int MPM = 45; /** MPM [default send] */ public static final int MPM_SND = 46; /** NI FTP */ public static final int NI_FTP = 47; /** Login Host Protocol */ public static final int LOGIN = 49; /** IMP Logical Address Maintenance */ public static final int LA_MAINT = 51; /** Domain Name Server */ public static final int DOMAIN = 53; /** ISI Graphics Language */ public static final int ISI_GL = 55; /** NI MAIL */ public static final int NI_MAIL = 61; /** VIA Systems - FTP */ public static final int VIA_FTP = 63; /** TACACS-Database Service */ public static final int TACACS_DS = 65; /** Bootstrap Protocol Server */ public static final int BOOTPS = 67; /** Bootstrap Protocol Client */ public static final int BOOTPC = 68; /** Trivial File Transfer */ public static final int TFTP = 69; /** Remote Job Service */ public static final int NETRJS_1 = 71; /** Remote Job Service */ public static final int NETRJS_2 = 72; /** Remote Job Service */ public static final int NETRJS_3 = 73; /** Remote Job Service */ public static final int NETRJS_4 = 74; /** Finger */ public static final int FINGER = 79; /** HOSTS2 Name Server */ public static final int HOSTS2_NS = 81; /** SU/MIT Telnet Gateway */ public static final int SU_MIT_TG = 89; /** MIT Dover Spooler */ public static final int MIT_DOV = 91; /** Device Control Protocol */ public static final int DCP = 93; /** SUPDUP */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -