001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020 021package org.apache.directory.server.dns.messages; 022 023 024import org.apache.directory.server.dns.util.EnumConverter; 025import org.apache.directory.server.dns.util.ReverseEnumMap; 026 027 028/** 029 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 030 */ 031public enum ServiceType implements EnumConverter<Byte> 032{ 033 /** Null */ 034 NULL(0), 035 036 /** Remote job entry */ 037 RJE(5), 038 039 /** Echo */ 040 ECHO(7), 041 042 /** Discard */ 043 DISCARD(9), 044 045 /** Active users */ 046 USERS(11), 047 048 /** Daytime */ 049 DAYTIME(13), 050 051 /** Quote of the day */ 052 QUOTE(17), 053 054 /** Character generator */ 055 CHARGEN(19), 056 057 /** File Transfer [Default Data] */ 058 FTP_DATA(20), 059 060 /** File Transfer [Control] */ 061 FTP(21), 062 063 /** Telnet */ 064 TELNET(23), 065 066 /** Simple Mail Transfer */ 067 SMTP(25), 068 069 /** NSW User System FE */ 070 NSW_FE(27), 071 072 /** MSG ICP */ 073 MSG_ICP(29), 074 075 /** MSG Authentication */ 076 MSG_AUTH(31), 077 078 /** Display Support Protocol */ 079 DSP(33), 080 081 /** Time */ 082 TIME(37), 083 084 /** Resource Location Protocol */ 085 RLP(39), 086 087 /** Graphics */ 088 GRAPHICS(41), 089 090 /** Host Name Server */ 091 NAMESERVER(42), 092 093 /** Who Is */ 094 NICKNAME(43), 095 096 /** MPM FLAGS Protocol */ 097 MPM_FLAGS(44), 098 099 /** Message Processing Module [recv] */ 100 MPM(45), 101 102 /** MPM [default send] */ 103 MPM_SND(46), 104 105 /** NI FTP */ 106 NI_FTP(47), 107 108 /** Login Host Protocol */ 109 LOGIN(49), 110 111 /** IMP Logical Address Maintenance */ 112 LA_MAINT(51), 113 114 /** Domain Name Server */ 115 DOMAIN(53), 116 117 /** ISI Graphics Language */ 118 ISI_GL(55), 119 120 /** NI MAIL */ 121 NI_MAIL(61), 122 123 /** VIA Systems - FTP */ 124 VIA_FTP(63), 125 126 /** TACACS-Database Service */ 127 TACACS_DS(65), 128 129 /** Bootstrap Protocol Server */ 130 BOOTPS(67), 131 132 /** Bootstrap Protocol Client */ 133 BOOTPC(68), 134 135 /** Trivial File Transfer */ 136 TFTP(69), 137 138 /** Remote Job Service */ 139 NETRJS_1(71), 140 141 /** Remote Job Service */ 142 NETRJS_2(72), 143 144 /** Remote Job Service */ 145 NETRJS_3(73), 146 147 /** Remote Job Service */ 148 NETRJS_4(74), 149 150 /** Finger */ 151 FINGER(79), 152 153 /** HOSTS2 Name Server */ 154 HOSTS2_NS(81), 155 156 /** SU/MIT Telnet Gateway */ 157 SU_MIT_TG(89), 158 159 /** MIT Dover Spooler */ 160 MIT_DOV(91), 161 162 /** Device Control Protocol */ 163 DCP(93), 164 165 /** SUPDUP */ 166 SUPDUP(95), 167 168 /** Swift Remote Virtual File Protocol */ 169 SWIFT_RVF(97), 170 171 /** TAC News */ 172 TACNEWS(98), 173 174 /** Metagram Relay */ 175 METAGRAM(99), 176 177 /** NIC Host Name Server */ 178 HOSTNAME(101), 179 180 /** ISO-TSAP */ 181 ISO_TSAP(102), 182 183 /** X400 */ 184 X400(103), 185 186 /** X400-SND */ 187 X400_SND(104), 188 189 /** Mailbox Name Nameserver */ 190 CSNET_NS(105), 191 192 /** Remote Telnet Service */ 193 RTELNET(107), 194 195 /** Post Office Protocol - Version 2 */ 196 POP_2(109), 197 198 /** SUN Remote Procedure Call */ 199 SUNRPC(111), 200 201 /** Authentication Service */ 202 AUTH(113), 203 204 /** Simple File Transfer Protocol */ 205 SFTP(115), 206 207 /** UUCP Path Service */ 208 UUCP_PATH(117), 209 210 /** Network News Transfer Protocol */ 211 NNTP(119), 212 213 /** HYDRA Expedited Remote Procedure */ 214 ERPC(121), 215 216 /** Network Time Protocol */ 217 NTP(123), 218 219 /** Locus PC-Interface Net Map Server */ 220 LOCUS_MAP(125), 221 222 /** Locus PC-Interface Conn Server */ 223 LOCUS_CON(127), 224 225 /** Password Generator Protocol */ 226 PWDGEN(129), 227 228 /** CISCO FNATIVE */ 229 CISCO_FNA(130), 230 231 /** CISCO TNATIVE */ 232 CISCO_TNA(131), 233 234 /** CISCO SYSMAINT */ 235 CISCO_SYS(132), 236 237 /** Statistics Service */ 238 STATSRV(133), 239 240 /** INGRES-NET Service */ 241 INGRES_NET(134), 242 243 /** Location Service */ 244 LOC_SRV(135), 245 246 /** PROFILE Naming System */ 247 PROFILE(136), 248 249 /** NETBIOS Name Service */ 250 NETBIOS_NS(137), 251 252 /** NETBIOS Datagram Service */ 253 NETBIOS_DGM(138), 254 255 /** NETBIOS Session Service */ 256 NETBIOS_SSN(139), 257 258 /** EMFIS Data Service */ 259 EMFIS_DATA(140), 260 261 /** EMFIS Control Service */ 262 EMFIS_CNTL(141), 263 264 /** Britton-Lee IDM */ 265 BL_IDM(142), 266 267 /** Survey Measurement */ 268 SUR_MEAS(243), 269 270 /** LINK */ 271 LINK(245); 272 273 private static ReverseEnumMap<Byte, ServiceType> map = new ReverseEnumMap<>( ServiceType.class ); 274 275 private final byte value; 276 277 278 ServiceType( int value ) 279 { 280 this.value = ( byte ) value; 281 } 282 283 284 public Byte convert() 285 { 286 return this.value; 287 } 288 289 290 /** 291 * Converts an ordinal value into a {@link ServiceType}. 292 * 293 * @param value 294 * @return The {@link ServiceType}. 295 */ 296 public static ServiceType convert( byte value ) 297 { 298 return map.get( value ); 299 } 300}