Developer Pointers
Articles and Tips: article
01 Nov 1997
Novell Technical Information Documents
All of the Technical Information Documents (TIDs) discussed below are available at the following locations:
The Novell Technical Solutions Database on CompuServe (GO NTID)
The DeveloperNet Support World Wide Web site (http://devsup.novell.com)
The DeveloperNet Support Bulletin Board (801-861-5836)
Object API, Send Messages, (Delphi App)
Author: |
RL |
|||
DocumentID: |
TID101365 |
|||
Date: |
8/22/97 12:30 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
GW5XOB41.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This application demonstrates how to log in to GroupWise 5.x and send a mail message through the Object API. This application also uses the Name Completion control.
Detailed Description
You must install the Name Completion control in Delphi 2.0 before loading this project. To install the Name Completion control ActiveX, do the following in Delphi 2.0:
1. Click on Component|Install.
2. Scroll down the Installed Units list, choose GWNCC1, and click OK. (If you don't see a GWNCC1 in the list, see if there is something by the name of NGWNCC1, or something similar. You will use this instead of GWNCC1 and then replace everything in my code with the new name.)
3. When Delphi returns from adding the OCX, click on the OCX tab in Delphi and you will see the Name Completion control icon.
4. Now open this project.
File Information
Self-Extracting File Name: GW5XOB41.EXE
Files Included: |
Size |
Date |
Time |
||
GW5XOB41.TXT |
(this file) |
||||
MAIN.PAS |
111806 |
8-22-97 |
11:40 AM |
||
MAIL.RES |
876 |
8-22-97 |
11:40 AM |
||
MAIL.~DP |
182 |
8-22-97 |
11:40 AM |
||
MAIL.DPR |
191 |
8-22-97 |
11:40 AM |
||
MAIL.DOF |
484 |
8-22-97 |
11:40 AM |
||
MAIL.DSK |
3396 |
8-22-97 |
11:40 AM |
||
SEND.DFM |
995 |
8-22-97 |
11:40 AM |
||
SEND.~DF |
1003 |
8-22-97 |
11:40 AM |
||
SEND.PAS |
2433 |
8-22-97 |
11:40 AM |
||
SEND.DCU |
4624 |
8-22-97 |
11:40 AM |
||
MAIL.EXE |
215040 |
8-22-97 |
11:40 AM |
||
SEND.~PA |
2409 |
8-22-97 |
11:40 AM |
||
GW5XOB41.MSG |
162 |
8-22-97 |
11:40 AM |
||
GW5XOB41.TXT |
2784 |
8-22-97 |
11:40 AM |
Brainshare Document Management Sample
Author: |
RL |
|||
DocumentID: |
TID101378 |
|||
Date: |
8/26/97 11:27 AM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
GW5XOB43.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This sample code and the step samples are from the BrainShare Document Management CodeBreak (D02D) used in Nice and in Australia. The sample is a query sample for document libraries. The Zip file includes the /final, /step1, and /step2 directories. If you are using pkunzip from DOS, use the -d options to retain the directories.
File Information
Self-Extracting File Name: GW5XOB43.EXE
Files Included: |
Size |
Date |
Time |
||
GW5XOB43.TXT |
(this file) |
||||
DOC.ZIP |
858999 |
8-26-97 |
11:25 AM |
||
GW5XOB43.TXT |
1907 |
8-26-97 |
11:25 AM |
||
GW5XOB43.MSG |
331 |
8-26-97 |
11:25 AM |
CLIB.NLM Architecture Change / CLIBAUX.NLM
Author: |
RL |
|||
DocumentID: |
TID101363 |
|||
Date: |
8/22/97 12:30 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
I14796AJ.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
Novell has elected to introduce a change to the CLIB architecture. This TID outlines the basics of the change.
Detailed Description
Please consider the following comments about CLIBAUX.NLM, a shim being built for shipment starting in Novell SDK CD Release 13.
CLIBAUX.NLM permits developers to load their NLMs built with later SDK headers atop library versions earlier than the SDK. The latest library on which CLIBAUX.NLM may be loaded and remain loaded is server libraries v4.11i ("remain loaded" because CLIBAUX.NLM will automatically unload itself if upon examination of existing symbols, it can find none to supply that a library hasn't already supplied). An example of this is stat_411(). This function doesn't exist in NLMLIB.NLM (and therefore CLIB) prior to v4.11.
The CLIBAUX.NLM solution is targeted to reduce the size of Novell's PRELUDE.OBJ, which would otherwise continue grow in size and complexity.
The advantage to this scheme over the previous thinking is twofold. First, NWPre.Obj may be linked and the NLM will still run on older libraries. Previously, this was not true because _SetupArgV_411() was not extant in those libraries. CLIBAUX.NLM provides it--although on libraries previous to v4.11a, this is tantamount to calling the original _SetupArgv().
This does, however, introduce a small problem. The NLM may expect a slightly different return code for fputs() than can be given by CLIB.NLM prior to v4.11, which did not implement this function in ANSI compliance. (Later documentation and the interface's implementation starting in v4.11 when linked with NWPre.Obj have corrected this.)
The second advantage is that NLMs linking PRELUDE.OBJ do not lose the additional accuracy originally denied them when calling some functions, even under modern versions of the library that provided that accuracy. For example, the fat versions of PRELUDE.OBJ could usually only stub functionality in order to permit NLMs to load symbol-complete atop older versions of the library, and these NLMs paid for that completeness by sacrificing access to the fully functional interface in the modern library.
Novell currently advises developers against creating auto-load dependencies on CLIBAUX.NLM (even though it may be quite undesirable to expect system administrators to load it by hand).
Novell intends to make CLIBAUX.NLM a long-term solution.
Novell Developer Support will release further details as they become available.
File Information
Self-Extracting File Name: I14796AJ.EXE
Files Included: |
Size |
Date |
Time |
||
I14796AJ.TXT |
(this file) |
||||
I14796AJ.TXT |
4011 |
8-22-97 |
10:29 AM |
||
I14796AJ.MSG |
114 |
8-22-97 |
10:29 AM |
NLS License Certificate Format Omitted from SDK Release 12 Documentation
Author: |
RL |
|||
DocumentID: |
TID101375 |
|||
Date: |
8/22/97 12:36 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
PNLS12A.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
The documentation for SDK Release 12 NWSDK has been reformatted. The Novell Licensing System (NLS) License Certificate Format appendix was accidentally omitted. Therefore the self executing Envoy document NLSCERT.EXE has been provided.
File Information
Self-Extracting File Name: PNLS12A.EXE
Files Included: |
Size |
Date |
Time |
||
PNLS12A.TXT |
(this file) |
||||
NLSCERT.EXE |
531385 |
8-22-97 |
10:34 AM |
||
PNLS12A.TXT |
1811 |
8-22-97 |
10:34 AM |
||
PNLS12A.MSG |
240 |
8-22-97 |
10:34 AM |
NWGetPathFromDirectoryBase replaces NWGetPathFromDirectoryEntry
Author: |
RL |
|||
DocumentID: |
TID101372 |
|||
Date: |
8/22/97 12:36 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
ISCNDIR.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
The API to replace NWGetPathFromDirectoryEntry is NWGetPathFromDirectoryBase. This call is currently undocumented and will be documented in a future SDK release.
Detailed Description
The API to replace NWGetPathFromDirectoryEntry is NWGetPathFromDirectoryBase. There are some differences between these two functions. The path from NWGetPathFromDirectoryBase is returned as a group of components. Each directory, subdirectory or file in the path is considered to be a component. Each component is length preceded and is followed by the next component. The path is ended by a null. This call is currently undocumented and will be documented in a future SDK release. NWGetPathFromDirectoryBase will allow you to convert information returned from NWScanOpenFilesByConn2 to a path.
File Information
Self-Extracting File Name: ISCNDIR.EXE
Files Included: |
Size |
Date |
Time |
||
ISCNDIR.TXT |
(this file) |
||||
ISCNDIR.TXT |
2278 |
8-22-97 |
10:32 AM |
||
ISCNDIR.MSG |
161 |
8-22-97 |
10:32 AM |
Set the Country then add DR as alias in NDS
Author: |
RL |
|||
DocumentID: |
TID101366 |
|||
Date: |
8/22/97 12:31 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
RSTALIAS.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This code will set the Country in NDS and then add the alias DR.
File Information
Self-Extracting File Name: RSTALIAS.EXE
Files Included: |
Size |
Date |
Time |
||
RSTALIAS.TXT |
(this file) |
||||
SETALIAS.C |
6115 |
8-22-97 |
10:35 AM |
||
RSTALIAS.TXT |
1614 |
8-22-97 |
10:35 AM |
||
RSTALIAS.MSG |
70 |
8-22-97 |
10:35 AM |
Return string in appropriate Country Code
Author: |
RL |
|||
DocumentID: |
TID101368 |
|||
Date: |
8/22/97 12:31 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
RSTRNUM.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This program will take in a value (long) and return a string in the appropriate country code (i.e., 1.234 for France or 1,234 USA).
File Information
Self-Extracting File Name: RSTRNUM.EXE
Files Included: |
Size |
Date |
Time |
||
RSTRNUM.TXT |
(this file) |
||||
STRNUM.EXE |
56090 |
8-22-97 |
10:37 AM |
||
STRNUM.C |
3936 |
8-22-97 |
10:37 AM |
||
RSTRNUM.TXT |
1704 |
8-22-97 |
10:37 AM |
||
RSTRNUM.MSG |
130 |
8-22-97 |
10:37 AM |
Opening SYN_STREAM attributes in Win32 applications
Author: |
RL |
|||
DocumentID: |
TID101369 |
|||
Date: |
8/22/97 12:31 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
JFB97006.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
The file handle returned by NWDSOpenStream() cannot be used by standard I/O functions such as read(), write(), etc.
Detailed Description
The documentation provided for NWDSOpenStream() states that the function returns a file handle appropriate for the platform. In the case of Win32 this is an operating system file handle. The function _open_osfhandle() has to be used to associate a C run-time file handle with the existing operating system file handle. The C run-time file handle can then be used with standard functions like read(), write() etc.
The sample code in Figure 1 can be used to read a user's login script.
Figure 1: Reading a User's Login Script
NWDSCCODE ReadLoginScript(NWDSContextHandle handle, char * user) { NWFILE_HANDLE nwHandle = 0 ; NWDSCCODE ccode ; ccode = NWDSOpenStream(handle,user,"Login Script",1L,& nwHandle) ;& nwHandle) ; if (ccode) return ccode ; int fh = _open_osfhandle((long)nwHandle,_O_RDONLY) ; if (fh == -1) return -1 ; char buffer[256] ; while (read(fh,buffer,sizeof(buffer)) > 0) printf(buffer) ; printf("") ; close(fh) ; return 0 ; }
File Information
Self-Extracting File Name: JFB97006.EXE
Files Included: |
Size |
Date |
Time |
||
JFB97006.TXT |
(this file) |
||||
JFB97006.TXT |
2593 |
8-22-97 |
10:37 AM |
||
JFB97006.MSG |
116 |
8-22-97 |
10:37 AM |
Snapin classes for MFC
Author: |
RL |
|||
DocumentID: |
TID101359 |
|||
Date: |
8/22/97 12:29 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
MFCSNAP.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
Some earlier releases of the SDK CD included a set of classes for snapin development. This TID has the classes slightly modified and adapted for use with MFC.
The changes to the original classes are the use of MFC constructs for string and list management. Also, the additional implementation layer has been removed that was necessary to support different class libraries. While the classes are not quite complete, they have been tested in several actual projects. Further development should include unicode support and possible use of STL for the collections.
The classes were developed and tested with VC++ 5.
File Information
Self-Extracting File Name: MFCSNAP.EXE
Files Included: |
Size |
Date |
Time |
||
MFCSNAP.TXT |
(this file) |
||||
STDAFX.H |
614 |
8-22-97 |
10:25 AM |
||
STDAFX.CPP |
200 |
8-22-97 |
10:25 AM |
||
SNAPIN.HPP |
13157 |
8-22-97 |
10:25 AM |
||
SNAPIN.CPP |
23721 |
8-22-97 |
10:25 AM |
||
SNAP32.MDP |
33792 |
8-22-97 |
10:25 AM |
||
SNAP32.DSP |
3216 |
8-22-97 |
10:25 AM |
||
SNAP32.DSW |
535 |
8-22-97 |
10:25 AM |
||
SNAP32.MAK |
5844 |
8-22-97 |
10:25 AM |
||
MFCSNAP.TXT |
2438 |
8-22-97 |
10:27 AM |
||
MFCSNAP.MSG |
159 |
8-22-97 |
10:25 AM |
Gets a NetWare connection handle by reference
Author: |
RL |
|||
DocumentID: |
TID101364 |
|||
Date: |
8/22/97 12:30 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
RCONBYRF.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This TID explains how to get the connection handle from the server using the Primary reference.
File Information
Self-Extracting File Name: RCONBYRF.EXE
Files Included: |
Size |
Date |
Time |
||
RCONBYRF.TXT |
(this file) |
||||
CONNBYRF.EXE |
82944 |
8-22-97 |
10:39 AM |
||
CONNBYRF.CPP |
4801 |
8-22-97 |
10:39 AM |
||
RCONBYRF.TXT |
1661 |
8-22-97 |
10:39 AM |
||
RCONBYRF.MSG |
73 |
8-22-97 |
10:39 AM |
Gets the Default queue name
Author: |
RL |
|||
DocumentID: |
TID101367 |
|||
Date: |
8/22/97 12:31 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
RGTQUENM.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This TID explains how to get the default queue name when the printer name for NDS is passed in.
File Information
Self-Extracting File Name: RGTQUENM.EXE
Files Included: |
Size |
Date |
Time |
||
RGTQUENM.TXT |
(this file) |
||||
PRINTER.C |
7248 |
8-22-97 |
10:36 AM |
||
PRINTER.EXE |
263030 |
8-22-97 |
10:36 AM |
||
RGTQUENM.TXT |
1641 |
8-22-97 |
10:36 AM |
||
RGTQUENM.MSG |
75 |
8-22-97 |
10:36 AM |
Finds the print job size
Author: |
RL |
|||
DocumentID: |
TID101370 |
|||
Date: |
8/22/97 12:32 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
RPRTSIZE.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This program will read a print queue then take the job files and return the file size.
The USER logged in must be in the QUEUE SERVER list in the bindery to attach to the queue. Because PCONSOLE does not have this functionality, the ADDPSERV.C utility has been provided. This program will take the jobs starting from the position passed in on the command line and write them out to disk.
File Information
Self-Extracting File Name: RPRTSIZE.EXE
Files Included: |
Size |
Date |
Time |
||
RPRTSIZE.TXT |
(this file) |
||||
RPRTSIZE.TXT |
1965 |
8-22-97 |
10:38 AM |
||
PRTSIZE.EXE |
80620 |
8-22-97 |
10:38 AM |
||
PRTSIZE.C |
10930 |
8-22-97 |
10:38 AM |
||
RPRTSIZE.MSG |
396 |
8-22-97 |
10:38 AM |
SDK API list in dlls for win3.1 and win 95
Author: |
RL |
|||
DocumentID: |
TID101357 |
|||
Date: |
8/22/97 10:24 AM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
SDKAPIST.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
These two text files list the APIs with the library and platform they are with. You can grep this list, or use it to find out which library you need to link in with the API you are using. The list is developed at release 8. So newer APIs may not be there.
File Information
Self-Extracting File Name: SDKAPIST.EXE
Files Included: |
Size |
Date |
Time |
||
SDKAPIST.TXT |
(this file) |
||||
SDKAPI31.TXT |
55225 |
8-22-97 |
10:23 AM |
||
SDKAPIST.TXT |
1895 |
8-22-97 |
10:23 AM |
||
SDKAPI95.TXT |
52318 |
8-22-97 |
10:23 AM |
||
SDKAPIST.MSG |
270 |
8-22-97 |
10:23 AM |
SMS: Identifying Target Service Type
Author: |
RL |
|||
DocumentID: |
TID101373 |
|||
Date: |
8/22/97 12:36 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
SMS_SVC.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This TID describes an update to NWSMTSGetTargetServiceType()
Detailed Description
A developer recently reported that NWSMTSGetTargetServiceType() was not working correctly on the OS/2 remote TSA. Further research indicated that the call did in fact work correctly on OS/2, but with the caveat that it must be called after connecting to the TSA, but before connecting to a target service. Note that this API returns a string for target service type (i.e., "DOS", "NetWare", etc.) along with the version number of the TSA.
Also, it was discovered that this API did not work correctly in the MAC TSA and Win 95 TSA. This has been corrected in both TSAs.
File Information
Self-Extracting File Name: SMS_SVC.EXE
Files Included: |
Size |
Date |
Time |
||
SMS_SVC.TXT |
(this file) |
||||
SMS_SVC.TXT |
2130 |
8-22-97 |
10:32 AM |
||
SMS_SVC.MSG |
62 |
8-22-97 |
10:32 AM |
SDK API listed per library
Author: |
RL |
|||
DocumentID: |
TID101360 |
|||
Date: |
8/22/97 12:29 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
SDKAPIX.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
These two text files list the APIs with the library and platform they are with. You can grep this list, or use it to find out which library you need to link in with the API you are using. You can E-mail this to customers but warn them it hasn't been proofed. I have only done Win31 and Win95. Give me your feedback. I will make these available to external customers as soon as I develop a search engine for this.
File Information
Self-Extracting File Name: SDKAPIX.EXE
Files Included: |
Size |
Date |
Time |
||
SDKAPIX.TXT |
(this file) |
||||
SDKAPI95.TXT |
53502 |
8-22-97 |
10:24 AM |
||
SDKAPI31.TXT |
56483 |
8-22-97 |
10:24 AM |
||
SDKAPIX.TXT |
1906 |
8-22-97 |
10:24 AM |
||
SDKAPIX.MSG |
426 |
8-22-97 |
10:24 AM |
File System Monitor Hooks Example
Author: |
RL |
|||
DocumentID: |
TID101361 |
|||
Date: |
8/22/97 12:30 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
XFSH1A.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This TID demonstrates a method of implementing File System Monitor Hooks with minimal impact on NetWare processes.
File Information
Self-Extracting File Name: XFSH1A.EXE
Files Included: |
Size |
Date |
Time |
||
XFSH1A.TXT |
(this file) |
||||
FSHOOK.HTM |
10531 |
8-22-97 |
10:27 AM |
||
FSHOOK.TXT |
9285 |
8-22-97 |
10:27 AM |
||
FSHOOK.WPD |
11827 |
8-22-97 |
10:27 AM |
||
XFSH1A.C |
19168 |
8-22-97 |
10:27 AM |
||
XFSH1A.NLM |
15637 |
8-22-97 |
10:27 AM |
||
XFSH1A.TXT |
1781 |
8-22-97 |
10:27 AM |
||
XFSH1A.MSG |
107 |
8-22-97 |
10:27 AM |
SMS and archive bits
Author: |
RL |
|||
DocumentID: |
TID101374 |
|||
Date: |
8/22/97 12:36 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
SMS_ARCH.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This TID discusses archive bits as they pertain to native NetWare file systems.
Detailed Description
A developer recently asked what file attribute bits should be examined/manipulated for the purpose of archiving.
The _A_ARCH bit can be set by a backup engine to indicate that a file/directory has been backed up. Subsequent modifications will turn this bit off.
The _A_ATTR_ARCHIVE bit is significant in that it reflects if a change has occurred in a file's meta data (ownership, trustee information, etc.)
File Information
Self-Extracting File Name: SMS_ARCH.EXE
Files Included: |
Size |
Date |
Time |
||
SMS_ARCH.TXT |
(this file) |
||||
SMS_ARCH.TXT |
1982 |
8-22-97 |
10:33 AM |
||
SMS_ARCH.MSG |
80 |
8-22-97 |
10:33 AM |
VB DDE SendMail Sample to GroupWise
Author: |
RL |
|||
DocumentID: |
TID101353 |
|||
Date: |
8/19/97 5:01 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
VBDDE.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
This TID shows how to send mail from VB to GroupWise using DDE.
Detailed Description
Problem
How do I construct a VB command string to send to GroupWise?
Solution
Use Chr(34) to specify Quote marks.
Sample String
To send "FileOpen("filename.txt") to GroupWise create the following code for VB:
Dim Cmd
Cmd = "FileOpen(" & Chr(34) & "filename.txt" & Chr(34) & ")"
The sample application included gives a popup Dialog to prompt for To:, Subject:, and Message: for the SendMail.
File Information
Self-Extracting File Name: VBDDE.EXE
Files Included: |
Size |
Date |
Time |
||
VBDDE.TXT |
(this file) |
||||
GWDDE.FRM |
3127 |
8-19-97 |
5:00 PM |
||
GWDDE.TXT |
996 |
8-19-97 |
5:00 PM |
||
GWDDE.VBP |
939 |
8-19-97 |
5:00 PM |
||
VBDDE.TXT |
2098 |
8-19-97 |
5:00 PM |
||
VBDDE.MSG |
58 |
8-19-97 |
5:00 PM |
Disabling Nagle Algorithm for TCP/IP Socket and/or TLI Interface
Author: |
RL |
|||
DocumentID: |
TID101362 |
|||
Date: |
8/22/97 12:30 PM |
|||
Alert status: |
Yellow |
|||
Information type: |
Issue |
|||
Readme for: |
IBSDS003.EXE |
|||
Novell productclass: |
NetWare API |
|||
Novell product andversion: |
NetWare SDK |
|||
Category: |
None |
Abstract
TCPIP.NLM version 3.1 enables the Nagle Algorithm by default. This document includes code to disable the function per socket. This feature is introduced in the TLI interface for TCP/IP in the post 4.0 version of TCPIP.NLM. The TLI interface is also included.
Detailed Description
In TCP/IP version 3.1, the Nagle Algorithm is enabled by default, but you can disable it for individual sockets by using setsockopt() with the TCP_NODELAY option as shown below.
The Nagle Algorithm prevents excessive bandwidth utilization by applications that send many small packets. It allows slight delays before sending individual small packets in order to combine them into a single larger packet.
For sample code showing how to disable the Nagle Algorithm, see Figure 2.
Figure 2: Code for Disabling the Nagle Algorithm
Using Sockets Interface: #define TCP_NODELAY 1 SKT s; int off = 1; ... open socket, connect... setsockopt( s, IPPROTO_TCP, TCP_NODELAY, ( char * )&off, sizeof ( off ) );& Using TLI interface: #define TCP_NODELAY 0x01 #define INET_TCP 0x06 struct t_opthdr { unsigned long len; unsigned long level; unsigned long name; unsigned long status; /* kp_val isn't used for Nagle, but for keep alives. */ /* set to NULL for this sample. See IBSDS002 for keepalive sample*/ struct t_kpalive kp_val; int tcp_nagles; }; /******************************************************** Declare automatic variable for request & ret structures *********************************************************/ struct t_optmgmt ret, request; struct t_info info; request.opt.buf = (char *) calloc( 1, sizeof( struct t_opthdr ) ); if( request.opt.buf == NULL ) { printf("\nOut of memory error"); exit( 1 ); } request.opt.len = sizeof( struct t_opthdr ); ret.opt.buf = (char *) calloc( 1, sizeof( struct t_opthdr ) ); if( ret.opt.buf == NULL ) { printf("\nOut of memory error"); exit( 1 ); } ret.opt.len = ret.opt.maxlen = sizeof( struct t_opthdr ); ret.flags = NULL; request.flags = (long)T_NEGOTIATE; ( (struct t_opthdr * )request.opt.buf)->len =sizeof(struct t_opthdr); ( (struct t_opthdr * )request.opt.buf)->level=INET_TCP; ( (struct t_opthdr * )request.opt.buf)->name=TCP_NODELAY; /* disable Nagles Algorithm */ ( (struct t_opthdr * )request.opt.buf)->tcp_nagles = 0; if ((rc = t_optmgmt(fd, &request, &ret)) == -1 )& { t_error( "t_optmgmt" ); } else { printf("\nt_optmgmt succeeded); } free( ret.opt.buf ); free( request.opt.buf );
File Information
Self-Extracting File Name: IBSDS003.EXE
Files Included: |
Size |
Date |
Time |
||
IBSDS003.TXT |
(this file) |
||||
IBSDS003.TXT |
4033 |
8-22-97 |
10:28 AM |
||
IBSDS003.MSG |
262 |
8-22-97 |
10:28 AM |
Disclaimer
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.