Annotation of mstools/h/atalkwsh.h, revision 1.1.1.1

1.1       root        1: /*++
                      2: 
                      3: Copyright (c) 1992  Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:     wshatalk.h
                      8: 
                      9: Abstract:
                     10: 
                     11:        This is the header file for application using Windows Sockets for
                     12:        Appletalk.
                     13: 
                     14: Author:
                     15: 
                     16:     Nikhil Kamkolkar ([email protected])
                     17: 
                     18: Revision History:
                     19:     10 Jul 1992     Initial Version
                     20: 
                     21: --*/
                     22: 
                     23: //
                     24: //  All protocol types should be specified in the Decimal base
                     25: //
                     26: 
                     27: #define DECIMAL_BASE    10
                     28: 
                     29: //
                     30: //  Protocol number 0 is invalid in the Appletalk case
                     31: //
                     32: 
                     33: #define        ATPROTO_BASE    (1000 * AF_APPLETALK)
                     34: #define        SOL_APPLETALK   (ATPROTO_BASE)
                     35: 
                     36: #define DDPPROTO_RTMP   (ATPROTO_BASE + 1)
                     37: #define DDPPROTO_NBP    (ATPROTO_BASE + 2)
                     38: #define DDPPROTO_ATP    (ATPROTO_BASE + 3)
                     39: #define DDPPROTO_AEP    (ATPROTO_BASE + 4)
                     40: #define DDPPROTO_RTMPRQ (ATPROTO_BASE + 5)
                     41: #define DDPPROTO_ZIP    (ATPROTO_BASE + 6)
                     42: #define DDPPROTO_ADSP   (ATPROTO_BASE + 7)
                     43: 
                     44: #define DDPPROTO_MAX    (ATPROTO_BASE + 255)
                     45: 
                     46: //
                     47: //  Define the higher layer appletalk protocol types
                     48: //
                     49: 
                     50: #define ATPROTO_ADSP        (DDPPROTO_MAX + 1)
                     51: #define ATPROTO_ATP         (DDPPROTO_MAX + 2)
                     52: #define ATPROTO_ASP         (DDPPROTO_MAX + 3)
                     53: #define ATPROTO_PAP         (DDPPROTO_MAX + 4)
                     54: 
                     55: #define SO_REGISTER_NAME               0xA000
                     56: #define SO_DEREGISTER_NAME             0xA001
                     57: #define SO_LOOKUP_NAME                 0xA002
                     58: #define SO_CONFIRM_NAME                0xA003
                     59: #define        SO_LOOKUP_MYZONE                        0xA004
                     60: #define SO_LOOKUP_ZONES                0xA005
                     61: #define        SO_LOOKUP_ZONES_ON_ADAPTER      0xA006
                     62: #define        SO_LOOKUP_NETDEF_ON_ADAPTER     0xA007
                     63: 
                     64: //
                     65: //  PAP-specific options
                     66: //
                     67: 
                     68: #define SO_PAP_SET_SERVER_STATUS       0xA007
                     69: #define SO_PAP_GET_SERVER_STATUS       0xA008
                     70: #define        SO_PAP_PRIME_READ                       0xA009
                     71: 
                     72: 
                     73: #define ATADDR_ANY                     0            // Dynamic socket (=0)
                     74: #define ATADDR_BROADCAST               0xFF         // Broadcast node id (=ff)
                     75: 
                     76: //
                     77: //     Define flags/error codes peculiar to Appletalk
                     78: //
                     79: 
                     80: #define        WSAEMSGPARTIAL                  (WSABASEERR+100)
                     81: 
                     82: 
                     83: //     Maximum pap status size
                     84: #define        MAX_PAP_STATUS_SIZE             255
                     85: #define        MIN_PAP_READ_BUF_SIZE   4096
                     86: 
                     87: //     These are the unused 4 bytes returned in the PAP status packet. If ever
                     88: //     they are to be interpreted, they will be available.
                     89: #define        PAP_UNUSED_STATUS_BYTES 4
                     90: 
                     91: 
                     92: //
                     93: //  SOCKADDR_AT structure
                     94: //
                     95: 
                     96: typedef struct sockaddr_at {
                     97:     USHORT    sat_family;
                     98:     USHORT    sat_net;
                     99:     UCHAR     sat_node;
                    100:     UCHAR     sat_socket;
                    101: } SOCKADDR_AT, *PSOCKADDR_AT;
                    102: 
                    103: 
                    104: //
                    105: //     ***WARNING***
                    106: //     This is defined to be the same as the ATALK ADDRESS defined in atalktdi.h
                    107: //     Change this if the other changes.
                    108: //
                    109: 
                    110: typedef        union
                    111: {
                    112:        struct
                    113:        {
                    114:                USHORT          Network;
                    115:                UCHAR           Node;
                    116:                UCHAR       Socket;
                    117:        };
                    118:        ULONG                   Address;
                    119: } WSH_ATALK_ADDRESS, *PWSH_ATALK_ADDRESS;
                    120: 
                    121: //
                    122: //  Typedefs for the various options
                    123: //
                    124: 
                    125: //
                    126: //  ***WARNING***:
                    127: //  This should be exactly the same as NBP_NAME defined in atalktdi.h
                    128: //
                    129: 
                    130: #define MAX_ENTITY  32
                    131: typedef struct {
                    132:     CHAR    ObjectNameLen;
                    133:     CHAR    ObjectName[MAX_ENTITY];
                    134:     CHAR    TypeNameLen;
                    135:     CHAR    TypeName[MAX_ENTITY];
                    136:     CHAR    ZoneNameLen;
                    137:     CHAR    ZoneName[MAX_ENTITY];
                    138: } WSH_NBP_NAME, *PWSH_NBP_NAME;
                    139: 
                    140: typedef struct
                    141: {
                    142:        WSH_ATALK_ADDRESS               Address;
                    143:        USHORT                                  Enumerator;
                    144:        WSH_NBP_NAME                    NbpName;
                    145: } WSH_NBP_TUPLE, *PWSH_NBP_TUPLE;
                    146: 
                    147: typedef WSH_NBP_NAME    WSH_REGISTER_NAME, *PWSH_REGISTER_NAME;
                    148: typedef WSH_NBP_NAME    WSH_DEREGISTER_NAME, *PWSH_DEREGISTER_NAME;
                    149: 
                    150: typedef struct _WSH_LOOKUP_ZONES {
                    151:     ULONG   NoZones;
                    152: 
                    153:     //
                    154:     //  CHAR    Zones[] - null separated zones
                    155:     //
                    156: 
                    157: } WSH_LOOKUP_ZONES, *PWSH_LOOKUP_ZONES;
                    158: 
                    159: typedef struct _WSH_LOOKUP_NETDEF_ON_ADAPTER {
                    160:        USHORT  NetworkRangeLowerEnd;
                    161:        USHORT  NetworkRangeUpperEnd;
                    162: 
                    163:        //      This will be followed by a null terminated ansi default zone.
                    164:        //      PUCHAR  DefaultZone[]
                    165: 
                    166: } WSH_LOOKUP_NETDEF_ON_ADAPTER , *PWSH_LOOKUP_NETDEF_ON_ADAPTER;
                    167: 
                    168: typedef struct _WSH_LOOKUP_NAME {
                    169:     WSH_NBP_TUPLE    LookupTuple;
                    170:     ULONG   NoTuples;
                    171: 
                    172:     //
                    173:     //  Array of NoTuple WSH_NBP_TUPLEs
                    174:     //
                    175: 
                    176: } WSH_LOOKUP_NAME, *PWSH_LOOKUP_NAME;
                    177: 
                    178: typedef struct _WSH_PAP_GET_SERVER_STATUS {
                    179: 
                    180:        SOCKADDR_AT                     ServerAddr;
                    181:        UCHAR                           Reserved[PAP_UNUSED_STATUS_BYTES];
                    182:        UCHAR                           ServerStatus[MAX_PAP_STATUS_SIZE+1];
                    183: 
                    184: } WSH_PAP_GET_SERVER_STATUS, *PWSH_PAP_GET_SERVER_STATUS;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.