View Javadoc
1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *  
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *  
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License. 
18   *  
19   */
20  
21  package org.apache.directory.server.dns.messages;
22  
23  
24  import org.apache.directory.server.dns.util.EnumConverter;
25  import org.apache.directory.server.dns.util.ReverseEnumMap;
26  
27  
28  /**
29   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
30   */
31  public enum ServiceType implements EnumConverter<Byte>
32  {
33      /** Null */
34      NULL(0),
35  
36      /** Remote job entry */
37      RJE(5),
38  
39      /** Echo */
40      ECHO(7),
41  
42      /** Discard */
43      DISCARD(9),
44  
45      /** Active users */
46      USERS(11),
47  
48      /** Daytime */
49      DAYTIME(13),
50  
51      /** Quote of the day */
52      QUOTE(17),
53  
54      /** Character generator */
55      CHARGEN(19),
56  
57      /** File Transfer [Default Data] */
58      FTP_DATA(20),
59  
60      /** File Transfer [Control] */
61      FTP(21),
62  
63      /** Telnet */
64      TELNET(23),
65  
66      /** Simple Mail Transfer */
67      SMTP(25),
68  
69      /** NSW User System FE */
70      NSW_FE(27),
71  
72      /** MSG ICP */
73      MSG_ICP(29),
74  
75      /** MSG Authentication */
76      MSG_AUTH(31),
77  
78      /** Display Support Protocol */
79      DSP(33),
80  
81      /** Time */
82      TIME(37),
83  
84      /** Resource Location Protocol */
85      RLP(39),
86  
87      /** Graphics */
88      GRAPHICS(41),
89  
90      /** Host Name Server */
91      NAMESERVER(42),
92  
93      /** Who Is */
94      NICKNAME(43),
95  
96      /** MPM FLAGS Protocol */
97      MPM_FLAGS(44),
98  
99      /** 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 }