The NetCon Network Service library libnc provides a set of APPLICATION PROGRAM INTERFACE (API's) for UNIX Client programs utilizing NCP and Bindery protocols.
Programs utilizing these calls should be linked to libnc.a and libsocket.a.
-lnc
#include int AddBinderyObjectToSet (objname, objtype, propname, membername, membertype) u_char *objname, *propname, *membername; u_int objtype, membertype;
This function is used to add new entries into the bindery and property databases by adding a bindery object to a property of type Set.
objname Object name (input) This string contains the object name. ALL strings used in this function are 48 characters max including NULL terminator. This is the name of the object in the bindery database to which we will add the new member.
objtype Object type (input) This is the type of object that a new member will be added to.
propname Property name (input) this string contains the name of the property to which a new member will be added.
membername (input) this string is the name of the object to be added to the property.
membertype (input) the type of object to be added.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x41
-lnc
CheckMembership (objname, objtype, propname, membername, membertype) u_char *objname, *propname, *membername; u_int objtype, membertype;
This function is used to determine if an object is a member of a property Set
objname Object name (input) This string contains the object name. ALL strings used in this function are 48 characters max including NULL terminator.
objtype Object type (input) This is the type of object .
propname Property name (input) this string contains the name of the property .
membername (input) this string is the name of the object .
membertype (input) the type of object.
The return value form this function is 0 upon success and upon failure a NC_ERRNO number will returned.
0x17, 0x43; /* check membership request
-lnc
RemoveBinderyObjectFromSet (objname, objtype, propname, membername, membertype) u_char *objname, *propname, *membername; u_int objtype, membertype;
This function is used to delete entries from the bindery and property databases by deleting a bindery object from a property of type Set.
objname Object name (input) This string contains the object name. ALL strings used in this function are 48 characters max including NULL terminator. This is the name of the object in the bindery database from which we will delete the member.
objtype Object type (input) This is the type of object that a member will be deleted from.
propname Property name (input) this string contains the name of the property from which a member will be deleted.
membername (input) this string is the name of the object to be deleted from the set.
membertype (input) the type of object to be deleted.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
NCP Command Issued
0x17, 0x42; /* add-bindery-object-to-set request
-lnc
MapTrustee (objid, objname, objtype, propname, objid, objqty) u_long objid; u_char *objname, *propname; u_int objtype; char *mobjid; u_int *mobjqty;
This function is used map a object to a trustee id
objid Object Id (input) to map
objname Object name (input) This string contains the object name. ALL strings used in this function are 48 characters max including NULL terminator. This is the name of the object in the bindery database to which we will map trustee id.
objtype Object type (input) This is the type of object.
propname Property name (input) this string contains the name of the property which a trustee will be mapped.
mobjectid Mapped object id (output) this is the mapped trustee id that is returned.
mobjqty Mapped object qty (output) this is the quantity of trustees that have been already mapped including this one.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x4C; /* Map trustee
-lnc
AddTrustee (path, objid, rights, hndle) u_char *path; u_long objid; u_int rights, hndle;
This function adds a trustee to a file or directory's list of trustees.
path (input) this is a NULL terminated string containing the full pathname.
objid (input) this is the trustee unique object id.
rights (input) rights to assign to the file or directory.
hndle (input) file handle.
The bits in the trustee rights mask are.
bit
15 - 9 = not defined.
8 = Supervisor (all rights are granted).
-------
7 = Modify (file attributes can be modified).
6 = Visible ( file can been seen in directory scans.
5 = Access Control ( Trustee rights can be changed).
4 = Delete (file can be deleted).
---------
3 = Create (file can be created).
2 = Reserved.
1 = Write (file reads are allowed).
0 = Read (file reads are allowed).
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x16, 0x27; /* add-trustee request
-lnc
AttachToFileServer(sname, connid) char *sname; u_short *connid;
This function attaches (connects) to the named file server, resets the PrimaryConnectionID and returns the connection id in connid.
sname (input) Server name NULL terminated string.
connid (output) Connection id.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned. Error 0xf8 = already attached.
-lnc
DetachFromFileServer(connid) u_short connid;
This function disconnects from the file server references by the connection id connid.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-lnc
ChangeBinderyObjectPassword (objname, objtype, oldpasswd, newpasswd) u_char *objname, *oldpasswd, *newpasswd; u_int objtype;
This function changes the password entry for a bindery object.
objname Object name (input) string 48 characters max including NULL terminator, containing the name of the object.
objtype Object type (input) type of object.
oldpasswd Old password (input) Null terminated string containing the old password (NULL = no password).
newpassword New password (input) Null terminates string containing the new password to be assigned to the bindery object (NULL = no password).
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x40; /* create-bindery-object-password request
-lnc
GetConnectionNumber()
This function returns the default connection number.
The return value from this function is the connection number upon success. Upon failure a -1 will be returned.
-lnc
GetConnectionInformation(conn_num, objname, objtype, objid, logintime) u_int conn_num; char *objname; int *objtype; u_long *objid; u_char *logintime;
This function returns information about the user logged in the specified connection number.
conn_num Connection number (input) of the server (1 to 250).
objname Object name (Output) this field receives a string (48 bytes max including the NULL terminator) containing the name of the bindery object logged in at the connection number.
objtype Object type (Output) this field receives the objects type.
objid Object id (Output) receives the objects id.
logintime (Output) the file receives the date and time of the login.
The return value from this function is 0 upon success.
0x17, 0x16
-lnc
GetServerSerialNumber(serialno, applno) u_char *serialno, *applno;
This function fills in the serial and application number of the default connection, both are character arrays. serialno[4] and applhno[2].
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x12
-lnc
GetServerDescription(company, revision, rdate, notice) char *company, *revision, *rdate, *notice;
This function returns the strings company, revision, revision date and copyright notice.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0xc9
-lnc
GetServerVersion(sname, version, subversion, max_conn, conn_in_use, mvols) char *sname, *version, *subversion; u_int *mvols, *max_conn, *conn_in_use;
This function returns information on the named server.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x11
-lnc
CreateDir (path, rights, hndle) u_char *path; u_int rights, hndle;
This function creates a directory on the default server.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x15, 0x0a
-lnc
DeleteDir (path, rights, hndle) u_char *path; u_int rights, hndle;
This function deletes a directory on the server with the default connection id.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x16, 0x0b
-lnc
CreateProperty (objname, objtype, propname, propflags, propsecurity) u_char *objname, *propname; u_int objtype, propflags, propsecurity;
This function creates a new property for an object.
objname Object name (input) 48 byte max NULL terminated string containing the object name.
objtype Object type (input) type of object.
propname Property name (input) 48 byte max NULL terminated string containing the property name.
propflags Property flags (input) static or dynamic, ORed with item or set.
propsecurity Property security (input) indicates read/write access.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x39
-lnc
CreateBinderyObject (objname, objtype, objflag, objsecurity) u_char *objname; u_int objtype, objflag, objsecurity;
This function creates an object in the bindery database
objname Object name (input) 48 byte max including NULL terminator string containing the new object name.
objtype Object type (input) type of new bindery objects.
objflag Object flag (input) dynamic or static.
objsecurity Object security (input) read/write access of object.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x32
-lnc
DeleteBinderyObject(objname, objtype) u_char *objname; u_int objtype;
objname Object name (input) 48 byte max including NULL terminator string containing the object name to delete.
objtype Object type (input) type of bindery objects to delete.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x40; /* create-bindery-object-password request
-Inc
GetBinderyObjectID(objname, objtype, objid) char *objname; u_int objtype; u_long *objid;
This function returns an object unique identification number.
objname Object name (input) 48 byte max including NULL terminator string containing the object name.
objtype Object type (input) type of bindery objects.
objid Object id (output) unique id number.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x40; /* create-bindery-object-password request
-Inc
LoginToFileServer(objname, objtype, objpasswd) char *objname, *objpasswd; u_int objtype;
This function logs a user (bindery object) into a file server.
objname Object name (input) 48 byte max including NULL terminator string containing the object name.
objtype Object type (input) type of bindery objects.
objpasswd Object password (input) 128 max byte NULL terminated string containing the objects password.
The return value from this function is 0 upon success.
0x17, 0x14
-Inc
GetBinderyObjectName(objid, objname, objtype) u_long objid; char *objname; u_int *objtype;
This function returns the name and type of an object from the bindery database.
objid Object id (input) unique object id.
objname Object name (output) 48 byte max NULL terminated string containing the object name being returned.
objtype Object type (output) returned.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
0x17, 0x36 Get Bindery Object Name
-Inc
AttachAndLoginToFileServer(server) char *server;
This function attaches and logs into the named server with the default user id mapping from the "/usr/lib/netcon/netcpasswd" database.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-lnc
#include "netccals.h"
net_ioctl_fd (fd, proto, cmd, arg)
int fd, cmd, *arg;
char *proto;
Like net ioctl (NETC), this function is used to send specific ioctl (S) commands to socket descriptors. In this case, however, the caller is required to provide a socket descriptor fd, obtained from a socket () call.
This function is not normally called by the user, but by higher- level functions such as netcconnect (NETC), and netclogin (NETC). For example, netcconnect (NETC) calls socket () to obtain a file descriptor. It then calls net ioctl fd (NETC) on that file descriptor to attach to a server. Finally, netcconect (NETC) returns the file descriptor to the caller.
If the call is sucessful, a value of 0 is returned. Depending on the command, other information may also be returned. Otherwise, -1 is returned and errno has the error number.
The netcconect (NETC) is a good example of opening a socket and making an ioctl() request.
/* Attach to specified server, returning connection ID */
netcconect (server)
char *server;
{
int fd;
if ((fd=socket (AF_NS, SOCK_DGRAM, 0)) <0)
return -1
if (net_ioctl_fd (fd, "NETC", NETC_SYSC_CONNECT,
(int *) &server)) {
close (fd);
return -1
}
SetPrimaryConnectionID (fd);
return fd;
}
net_ioctl_fd (NETC), ioctl (), socket ().
-Inc
login_to_server(connid, server, user, pass) char *server, *user, *pass;
This function logs into the specified server with the specified users id.
connid Connection id (input).
server Server name (input) string 48 bytes max NULL terminated containing the name of the server to login to.
user User name (input) string 48 bytes max NULL terminated containing the name of the user to login.
pass Password (input) string 128 bytes max with NULL terminator, containing the user's password.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
LoginToFileServer.
-lnc
netcsetconns (count)
int count;
count specifies the maximum simultaneous connections to be allowed. This function sets the maximum number of client connections available at one time. The real limit is set by the NetCon kernel code; this function only sets an available maximum that is less than or equal to the kernel limit, but not less than two. Due to system requirements, netcsetconns (NETC) can only be called before netcinit (NETC) has been called.
This function is called by the Unix-to-NetWare password mapping daemon netcpass at startup, before it calls netcinit (NETC).
netcsetconns (NETC) returns 0 on success. It will fail if netcinit (NETC) has already been called, and will return -1 with errno set to EACCES.
/* Allow up to 10 simultaneous client connections */
if (netcsetconns (10)) {
perror ("Can't set connection count");
exit (1);
}
-lnc
netcaddgroup (uid, gid)
int uid, gid
Add a group to a users NetCon supplemental group list. This function will add the group with ID gid to the supplemental group list of the user with ID uid. The uid is the user ID number from the /etc/passwd file, and gid is the group ID number from the /etc/group file that is to be added to the users supplemental group list. If the specified user has no supplemental group list, a new one is created for the user. The NetCon kernel maintains a list of supplemental groups for each user. This table is empty at system startup. netcaddgroup (NETC) is called by netcpass at startup to update the NetCon kernel user/group table from information in the /etc/group file.
netcaddgroup (NETC) returns 0 if sucessful. It will return -1 if it fails, and set errno to ENOMEM, insufficient memory to increase the table size. No validity checking is done on the user or group ID.
int uid, gid
if (netcaddgroup (uid, gid))
printf ("Error %d adding group. \n", errno);
-lnc
#include "netccalls.h"
netcaddentry (server, objid, uid, flags)
char *server;
int uid, flags;
unsigned long objid;
This function updates the Unix user-ID-to_NetWare-Object-ID mapping table in the NetCon kernel. server points to the name of the server which is to be mapped. objid is the NetWare object ID that is to be mapped to the Unix user or group ID uid. The type of entry to be mapped, such as user or group, is indicated with the appropriate flags. The flags may be set or examined via symbolic entries in netccalls.h. The password mapping daemon netcpass calls netcaddentry (NETC) to update the NetCon kernel user map from the mapping information in /usr/lib/netcon/netcpasswd.
/*
* Map unix group to a netware server group.
*/
#include "netccalls.h"
char *sname;
int unixid, flags;
u_long objid;
sname = "NETWARE";
unixid = unix_group_id;
objid = server_group_objid;
flags = GID_ENTRY;
if (netcaddentry (sname, objid, unixid, flags) <0)
fprintf (stderr,
"Error %d adding entry to kernel! \n, errno);
netcpasswd (NETC).
-lnc
#include "TFSparam.h"
netcconninfo (fd, conn, clen, serv, slen)
struct TFS_conn *conn;
struct TFS_server *serv;
int fd, clen, slen;
netcconninfo (NETC) returns information about the connection specified by file descriptor fd, obtained from a netcconnect (NETC) or socket () call. The information is returned in two buffers with structures that are declared in the header file TFSparam.h. conn and serv point to the two buffers that will receive this information. clen and slen are the respective lengths of these two buffers.
netcconninfo (NETC) returns 0 on success, and fills in the TFS_conn and TFS_server structures. Otherwise, -1 is returned with errno set to the error number.
#include "TFSparam.h"
struct TFS_conn conn;
struct TFS_server serv;
int slen, clen, fd
if (netcconninfo (fd, &conn, sizeof (conn), &serv, sizeof (serv))
perror ("netcconninfo");
-lnc
#include "TFSparam.h"
netcgetuseradminreq (req, rlen)
struct Net_User_Req *req;
int *rlen;
netcgetuseradminreq (NETC) is used to service administrative requests from the NetCon kernel. The kernel makes this request to map Unix users and groups to NetWare server users and groups on demand; that is, when a Unix user attempts to use a mounted NetWare server. The user call will block until the kernel makes a request.
Only one netcgetuseradminreq (NETC) administrative request may be outstanding. An attempt to schedule more than one will result in an EAGAIN error on the subsequent attempts. The password mapping daemon netcpass services these administrative requests. netcpass calls this function and waits for kernel requests. Therefore, there is always an outstanding administrative request. No others are permitted while netcpass is running.
netcgetuseradminreq (NETC) returns 0 on success, with the request structure and the new request length filled in. Otherwise, -1 is returned with errno set to the error number.
netcgetuseradminreq (NETC) uses the following structure to obtain information from the kernel. It is the callers responsibility to declare this structure.
struct Net_User_Req {
int code;
char serv [TFS_SRVNAMESIZ]; unsigned
char data [256];
} req;
int rlen;
rlen = sizeof (req);
if (netcgetuseradminreq (&req, &rlen))
perror ("GetUserAdminReq error");
netcsenduseradminreply (NETC).
-lnc
#include "TFSparam.h"
netcsenduseradminreply (buf, len, status)
char *buf;
int len, status;
netcsenduseradminreply (NETC) is used to send replies to the administrative requests received from the NetCon kernel via netcgetuseradminreq (NETC). buf is usually a pointer to a TFS_pwent structure, len is the size of the structure, and status is zero to indicate success, or an error number.
The password mapping daemon netcpass uses this function in conjunction with netcgetuseradminreq (NETC) to communicate responses to the kernel requests for mapping information.
netcsenduseradminreply (NETC) returns 0 on success, -1 on failure with errno set to the error number.
if (netcsenduseradminreply (buf, len, status) <0) {
perror ("SendUserAdminReply error");
return -1;
}
netcgetuseradminreq (NETC).
-lnc
netclogin (fd, username, passwd)
int fd;
char *username, *passwd;
The netclogin function logs the user specified by username into the server specified by file descriptor fd, using passwd as the users password. The file descriptor, fd is obtained by calling netcconnect (NETC). This login function performs an encrypted login, unlike LoginToFileServer (NETC).
It is also possible to login without a username and password using this function. If the value of the username and passwd parameters is NULL, the default user (see netcpasswd (NETC)) is logged in.
If the encrypted login attempt fails, an unencrypted login is attempted.
A value of 0 is returned if the login is sucessful. If the login attempt fails, a value of -1 is returned and errno is set to the error number.
int fd;
char *username, *passwd;
if (netclogin (fd, username, passwd)<0)
return -1; /*error*/
else
return 0; /*sucess*/
Encrypted login 0x17, 0x18 or unencrypted login 0x17, 0x14.
login_to_server (NETC), netcconnect (NETC, netcpasswd (NETC), LoginTOFileServer (NETC).
-Inc
net_ioctl(proto, cmd, arg) char *proto; int cmd; int *arg;
This function is used to send ioctl commands to the socket descriptors see "/usr/lib/netcon/src/h/syscall.h" for all the calls supported by NetCon. All types of communication to and from the kernel can take place through ioctl calls on the UNIX file descriptors returned to user programs from sockets() system calls.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
ncp_init()
This function initilizes the kernel structures containing the Server tables, the connection table and the user mapping table etc... This function is automatically run by "netcon" and "netcpass" at startup. If the kernel Server table is NULL this can be run at any time.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
net_mount (proto, alen, addr, rdir, ldir, flags) char *proto, *addr, *rdir, *ldir; int alen, flags;
This function mounts a NOVELL NetWare servers VOLUMES as a UNIX directory. This function is like the UNIX mount command or call.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
net_mount( "NCP", 0, "", "NW386:SYS:/", "/mnt");
NWfh_to_fd (fd(fh, off)
char *fh;
off_t off;
Allocate a file descriptor for an open network file. fh is an open file handle. off is the current offset of the file. The file handle and offset are saved in the file descriptor structure, and the file descriptor is returned.
An integer file descriptor is returned. This file descriptor can be used in subsequent NWread (NETC), NWwrite (NETC), NWlseek (NETC), and NWclose (NETC) calls. -1 is returned if the function fails, and errno is set to the error number. The only error returned is EMFILE, too many open files.
int fd;
fd=NWfh_to_fd (fh, (off_t) 0);
NWclose (fd);
This program is used by the nprint program to allocate a file descriptor for the open file handle returned by the server in response to a CreateQueue request. Subsequent NWwrite (NETC) calls are made using this file descriptor.
-Inc
ncp_connect(server) char *server;
This function connects to the named server.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
ncp_request(fd, func_code, reqbuf, reqlen, replybuf, replylen, status) char *reqbuf, *replybuf; int *status, *replylen;
This function can be used to send out any NCP request you may require to the network. All the required NCP functions are preformed through calls from the higher level interfaces, so programs never have to make NCP calls directly. But we must play so have fun, you had better have a Sniffer for this one.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
NWopen(fname, mode) char *fname;
Opens a file on the default file server same as open().
fname Full pathname (input) string 256 bytes max including NULL terminator.
mode Mode (input) 0 = readonly, 1 = write only, 2 = read/write, see "fcntl.h"
The return value from this function is a UNIX file descriptor upon success and upon failure a -1 will be returned.
-Inc
NWread(fd, buf, len) int fd, len; char *buf;
This function reads from the file descriptor on the default NetWare server the amount of data specified in len into buf. This file descriptor is established by the an NWopen() call.
fd File descriptor (input) returned from NWopen().
buf Pointer to a buffer (output).
len Length to read from file and write int
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
NWwrite(fd, buf, len) int fd, len; char *buf;
This function writes to a file descriptor at the current file pointer position on a NetWare server the amount of data specified by len, from buf.
fd File descriptor (input) returned from NWopen().
buf Pointer to a buffer (input).
len Length of data to write (input).
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
NWclose(fd) int fd;
This function closes a file opened with NWopen() see "close()".
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
NWlseek(fd, off, whence) off_t off; int fd, whence;
This function sets the file pointer position bases on offset and whence.
fd File Descriptor (input).
off Offset (input) in the file fd.
whence The offset is from whence in the file, 0 = pointer set to off, 1 = pointer set to current plus off, 2 = end of file plus offset.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
ReadPropertyValue(objname, objtype, pname, seg, pvalue, moresegs, pflags) char *pname, *objname; int seg; u_int objtype; u_char *pvalue, *moresegs, *pflags;
This function returns the value of an object's property from the bindery database.
objname Object name (input) 48 byte string max including the NULL terminator containing the object name.
objtype Object type (input).
pname Property name (input) string 16 bytes long including the NULL terminator containing the name of the property.
seg Segment number (input) number of data reads 1st segment = 1 , 2nd segment = 2 etc...
pvalue Property Value (output) a pointer to a buffer t receives the property value 128 bytes max per segment.
moresegs More segments (output) receives a flag of 0x0 if no more segments, 0xff if more segments follow.
pflags Property flags (output) receives the dynamic or static flag ORed with item or set flags.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
NetwareRequest(code, req, reqlen, reply, replen) u_int code; u_char *req, *reply; int reqlen, *replen; onID = -1;
This function issues a netware request directly to the network.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
GetDefaultConnectionID()
This function returns the default connection id.
The return value from this function is the default connection id upon success and upon failure a -1 will be returned.
-Inc
GetPreferredConnectionID()
This function returns the preferred connection id.
The return value from this function is the preferred connection id upon success and upon failure a -1 will be returned.
-Inc
SetPreferredConnectionID(id)
This function sets the preferred connection to id.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
GetPrimaryConnectionID()
This function returns the primary connection id
The return value from this function is the primary connection id upon success and upon failure a -1 will be returned.
-Inc
SetPrimaryConnectionID(id)
This function sets the primary connection to id.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
ScanBinderyObject(searchname, searchtype, objid, objname, objtype, objhasproperties, objflags, objsecurity) char *searchname, *objname; u_char *objhasproperties, *objflags, *objsecurity; u_int searchtype, *objtype; u_long *objid;
This function scans the bindery database for an object.
searchname Object name (input) to search for.
objtype Object type (output) Receives the type of the matching object.
objhasproperties Object has properties (output) this field receives a 0x0 if no properties exist to scan or a 0xff if the object has properties.
objflags Object flags (output) this field is updated with a dynamic or static flag.
objsecurity Object security (output) is updated to indicate read/write access.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
ScanProperty( objname, objtype, searchprop, sequencenum, propname, propflags, propsecurity, propHasValue, moreflag) u_char *objname, *searchprop, *propname, *propflags, *propsecurity, *propHasValue, *moreflag; u_long *sequencenum; u_int objtype;
This function scans the bindery database for an object's properties.
objname Object name (input) this string is a max of 48 bytes long including the NULL terminator contains the name of the object.
objtype Object type (input) .
searchprop Search property name (input) string is a max of 16 bytes NULL terminated; may contain wildcards, including NULL.
seqencenum Sequence number (input/output) contains the number from the previous search (initial = -1) and is updated each search.
propname Property name (input) 16 byte NULL terminated string matching the property.
propflags Property flags (output) this field is updated with the property flags dynamic or static ORed with item or set.
propsecurity Property security (output) this field is updated to match the read/write access of the property.
propHasValue Property has value (output) updated to indicate the property has a attached value, 0 = no, 0xff = yes.
moreflag More properties (output) updated to indicate the object has more properties to scan for, 0 = no, 0xff = yes.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
-Inc
WritePropertyValue (objname, objtype, propname, segno, eraseflag, value) u_char *objname, *propname, *value; u_int objtype, segno, eraseflag;
This function writes a value to a property of type Item.
objname Object name (input) this string is a max of 48 bytes long including the NULL terminator contains the name of the object.
objtype Object type (input) .
propname Property name (input) string is a max of 16 bytes NULL terminated;
seqencenum Sequence number (input) contains the number of the data to be written (first = 1) and is updated every write.
eraseflag Overwrite property (input).
value Property value (input) to write max of 128 bytes.
The return value from this function is 0 upon success and upon failure a NC_ERRNO number will be returned.
NCP Command Issued