Converting datatypes from NDS to Perl and back.

The Netware API defines a lot of structs and datatypes that is not directly supported by perl.

Therefore I've written this file to give you an overview about what datatypes should be used when calling methods that
require a parameter called "SyntaxId". I've tried to be consecuent by using this variable-name(SyntaxId), but don't be surprised if you find other variable names.

All datatypes can be represented as Number(s) or String(s). There are no structures involved.

The constants are defined as SYN_* and can be retrieved by calling GetConst() from your perl script.

These are the datatypes defined by PerlWare:

 
Value
Constant name
Used in
Example
0 SYN_UNKNOWN Will return "\0" 
1 SYN_DIST_NAME Aliased Object Name 
Default Queue 
Device 
Equivalent To Me 
Group Membership 
Higher Privileges 
Host Device 
Host Server 
Mailbox Location 
Member 
Message Routing Group 
Message Server 
Messaging Server 
Operator 
Owner 
Postmaster 
Profile 
Profile Membership 
Reference 
Resource 
Role Occupant 
Security Equals 
See Also 
Server 
User 
Volume 
$Val = "MyServer" 
2 SYN_CE_STRING (none) ???  $Val = "MyName"; 
3 SYN_CI_STRING C (Country) 
Cartridge 
CN (Common Name) 
Description 
Full Name 
Generational Qualifier 
Given Name 
Host Resource Name 
Initials 
L (Locality 
Mailbox ID 
Messaging Server Type 
NNS Domain 
O (Organization) 
OU (Organizational Unit) 
Physical Delivery Office Name 
Postal Code 
Postal Office Box 
Queue Directory 
S (State or Province) 
SA (Street Address) 
SAP Name 
Supported Gateway 
upported Services 
 Supported Typefaces 
Surname 
Title 
Unknown Base Class 
Version 
$Val = "YourName"; 
4 SYN_PR_STRING Page Description Language 
Serial Number 
$Val = "What?"; 
5 SYN_NU_STRING Bindery Type  $Val = "Test"; 
6 SYN_CI_LIST Language  "String1\nString2\nString3\n...StringN\n" 
ex. $MyCIList = "FirstString\nSecondString\n";
7 SYN_BOOLEAN Allow Unlimited Credit 
Detect Intruder 
Locked By Intruder 
Lockout After Detection 
Login Disabled 
Password Allow Change 
Password Required 
Password Unique Required 
$Val = 1; 
8 SYN_INTEGER Bindery Object Restriction 
Convergence 
DS Revision 
GID (Group ID) 
Login Grace Limit 
Login Intruder Limit 
Login Maximum Simultaneous 
Memory 
Minimum Account Balance 
Password Minimum Length 
Security Flags 
Status 
Supported Connections 
UID (User ID) 
$Val = 23476; # Password Minimum Length :-) 
9 SYN_OCTET_STRING Authority Revocation 
Bindery Property 
CA Private Key 
CA Public Key 
Certificate Revocation 
Cross Certificate Pair 
External Name 
External Synchronizer 
Login Allowed Time Map 
Obituary 
Passwords Used 
Printer Configuration 
Private Key 
Public Key 
Replica Up To 
"Length\n$val1\n$val2\n$val3" 
ex. $MyOS = "4\n2E\n45\n4F\n7B\n"; 
10 SYN_TEL_NUMBER Telephone Number  $Val = "+47-180"; #White pages Norway 
This must be between 1 and 32 chars long 
11 SYN_FAX_NUMBER Facsimile Telephone Number  $MyFax = "+47-180\n"; 
12 SYN_NET_ADDRESS Login Intruder Address 
Network Address 
Network Address Restriction 
"AddressType\nAddress\n" 
ex.:
$IPXAddr = "0\n\11223344:AABBCCDDEEFF\n"; 
$TCPAddr = "9\n\158.38.37.1:\n";
$UDPAddr = "8\n\158.38.37.1:\n";
13 SYN_OCTET_LIST (none) ???  "Length\nOctets\nLength\nOctets\n" 
$MyOL = "11\nSome String\n2\nkl\n"; 
14 SYN_EMAIL_ADDRESS EMail Address  "Address\nAddressType\n" 
ex. $MyEmail = "Steinar.Kleven@ahs.hist.no\n2\n";
15 SYN_PATH
Home Directory 
Messaging Database Location
Path 
"NameSpacetype\nVolumeName\nPath\n" 
ex. $MyPath = "1\nCN=SRV_ACME_VOL1.Acme.US\nHOME\\MyHome\n"; 
16 SYN_REPLICA_POINTER Replica "Server\nRepType\nRepState\nRepNumber\nAddressType\nAddress" 
ex1: 
$Rep = "SRV_ACME\n2\n0\n1\n0\n020C0A00:000291AE5257\n"; 
ex2: 
$Rep ="SRV_ACME\n2\n40\n9\n10.0.0.3:524\n"; 
17 SYN_OBJECT_ACL ACL 
Inherited ACL
First line indicates the name of the specific attribute to be protected. 
Otherwise, should be null to protect the entire object. 
Second line indicates the name of the object receiving the rights to 
the protected object. [Root], [Public], [Inheritance Mask], 
 [Creator] and [Self] are 'built in' objects. 
Any other valid NDS object can also be used. 
The last line is the rights. 
        For [Entry Rights] you have: 
  B -> Browse 
  A -> Add 
  D -> Delete 
  R -> Rename 
  S -> Supervisor 
        For [SMS Rights] you have: 
  S -> Scan 
  B -> Backup 
  R -> Restore 
  C -> Rename 
  D -> Delete 
  A -> Admin 
        For [All Attributes Rights] you have: 
  C -> Compare 
  R -> Read 
  W -> Write 
  A -> Self 
  S -> Supervisor 
ex: "\n[S]\n[root]\n" 
        [root] has Supervisor access to the entire object 
ex: "[All Attributes Rights]\n[CR]\n[Self]\n" 
        [Self] has Compare & Read access to all it's attributes. 
ex: "\n[CRW]\n.everyone.Acme\n" 
.everyone.Acme has Read, Compare & Write rights to this object.
18 SYN_PO_ADDRESS Postal Address Can't be more than 6 lines. 
ex. $MyPOA = "First line\nSecond line\n....\nLast line\n"; 
19 SYN_TIMESTAMP Replica Up To 
Partition Creation Time 
Received Up To 
Synchronized Up To
"SecoundsSince1.1.70\nReplica\nEventID\n" 
ex. $Tstamp = "2354453\n1\n23\n";
20 SYN_CLASS_NAME Object Class $Val = "Username"; 
21 SYN_STREAM Login scripts This value is read/written like a file. 
Use Buf_T::OpenStream() to get a filehandle. 
22 SYN_COUNTER Account Balance 
Login Grace Remaining 
Login Intruder Attempts 
Revision
 $Val = 5; 
23  SYN_BACK_LINK Back Link "RemoteID\nObjectName\n" 
ex. $MyBackLink = "12\nMyLoginName\n"; 
24 SYN_TIME Last Login Time (Read only) 
Login Expiration Time 
Login Intruder Reset Time 
Login Time 
Low Convergence Reset Time 
Password Expiration Time
$Val = 1234534; 
(secounds since 1 Jan. 1970) 
25 SYN_TYPED_NAME Notify 
Partition Control 
Print Server 
Printer 
Queue
"ObjectName\nLevel\nInterval\n" 
ex. $TName = "MyName\n2\n30\n"; 
26 SYN_HOLD  Server Holds "ObjectName\nAmount\n" 
ex. $MyHold = "SRV_ACME\n12\n";
27 SYN_INTERVAL Certificate Validity Interval 
High Convergence Sync Interval 
Intruder Attempt Reset Interval 
Intruder Lockout Reset Interval 
Low Convergence Sync Interval 
Password Expiration Interval 
$Val = 90; 
28 SYN_COMPONENT
29 SYN_ENUM_COMPONENT
30 SYN_NULL
31 SYN_OID
32 SYN_ENUMERATED
33 SYN_SET
34 SYN_SEQUENCE
35 SYN_CHOICE
36 SYN_ANY