KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > filesys > netbios > RFCNetBIOSProtocol


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.filesys.netbios;
18
19 /**
20  * RFC NetBIOS constants.
21  */

22 public final class RFCNetBIOSProtocol
23 {
24
25     // RFC NetBIOS default port/socket
26

27     public static final int PORT = 139;
28
29     // RFC NetBIOS datagram port
30

31     public static final int DATAGRAM = 138;
32
33     // RFC NetBIOS default name lookup datagram port
34

35     public static final int NAME_PORT = 137;
36
37     // RFC NetBIOS default socket timeout
38

39     public static final int TMO = 30000; // 30 seconds, in milliseconds
40

41     // RFC NetBIOS message types.
42

43     public static final int SESSION_MESSAGE = 0x00;
44     public static final int SESSION_REQUEST = 0x81;
45     public static final int SESSION_ACK = 0x82;
46     public static final int SESSION_REJECT = 0x83;
47     public static final int SESSION_RETARGET = 0x84;
48     public static final int SESSION_KEEPALIVE = 0x85;
49
50     // RFC NetBIOS packet header length, and various message lengths.
51

52     public static final int HEADER_LEN = 4;
53     public static final int SESSREQ_LEN = 72;
54     public static final int SESSRESP_LEN = 9;
55
56     // Maximum packet size that RFC NetBIOS can handle (17bit value)
57

58     public static final int MaxPacketSize = 0x01FFFF + HEADER_LEN;
59 }
Popular Tags