1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
.\" DlpReadNetSyncInfo.3
.\"
.\" Copyright 2001, Andrew Arensburger.
.\" You may distribute this file under the terms of the Artistic
.\" License, as specified in the README file.
.\"
.\" $Id: DlpReadNetSyncInfo.3,v 1.1 2001/09/05 07:29:20 arensb Exp $
.\"
.\" This man page uses the 'mdoc' formatting macros. If your 'man' uses
.\" the old 'man' package, you may run into problems.
.\"
.Dd Aug 16, 2001
.Dt DlpReadNetSyncInfo 3
.Sh NAME
.Nm DlpReadNetSyncInfo ,
.Nm DlpWriteNetSyncInfo
.Nd read/write network HotSync information to a PalmOS device
.Sh LIBRARY
.Pa libpconn
.Sh SYNOPSIS
.Fd #include <palm.h>
.Fd #include <pconn/pconn.h>
.Ft int
.Fn DlpReadNetSyncInfo "PConnection *pconn" "struct dlp_netsyncinfo *netsyncinfo"
.Ft int
.Fn DlpWriteNetSyncInfo "PConnection *pconn" "const ubyte modflags" "const struct dlp_netsyncinfo *newinfo"
.Sh DESCRIPTION
.Nm DlpReadNetSyncInfo
reads network HotSync settings from a Palm.
.Pp
.Fa netsyncinfo
is filled in with this information. The
.Ft dlp_netsyncinfo
structure is defined as
.Bd -literal -offset indent
struct dlp_netsyncinfo
{
ubyte lansync_on;
uword hostnamesize;
uword hostaddrsize;
uword hostnetmasksize;
char hostname[DLPCMD_MAXHOSTNAMELEN];
char hostaddr[DLPCMD_MAXADDRLEN];
char hostnetmask[DLPCMD_MAXNETMASKLEN];
};
.Ed
where
.Fa lansync_on
is non-zero if LAN sync is enabled;
.Fa hostnamesize ,
.Fa hostaddrsize ,
and
.Fa hostnetmasksize
give the length of the strings in
.Fa hostname ,
.Fa hostaddr ,
and
.Fa hostnetmask ,
respectively (these lengths include the terminating NUL);
.Fa hostname
is filled in with the name of the sync host, as an ASCII string;
.Fa hostaddr
is filled in with the IP address of the sync host, as an ASCII string,
\fIe.g\fR,
.Dq 192.168.123.5 ;
.Fa hostnetmask
is filled in with the sync host's netmask, as an ASCII string,
\fIe.g.\fR,
.Dq 255.255.0.0 .
.Pp
It is not clear what the relationship between the host name, address,
and netmask is. Perhaps it is possible for the Palm to send a
broadcast request to a subnet to request a host with which to sync.
.Pp
.Nm DlpWriteNetSyncInfo
writes new network HotSync information to the Palm.
.Pp
.Fa newinfo
contains the data to upload. It is not necessary to fill in all of the
fields, only those which one wishes to modify.
.Pp
.Fa modflags
specifies which fields to update:
.Bl -tag -width "LIS" -compact -offset indent
.It Dv DLPCMD_MODNSFLAG_LANSYNC
.Fa newinfo.lansync_on
.It Dv DLPCMD_MODNSFLAG_HOSTNAME
.Fa newinfo.hostnamesize
and
.Fa newinfo.hostname
.It Dv DLPCMD_MODNSFLAG_HOSTADDR
.Fa newinfo.hostaddrsize
and
.Fa newinfo.hostaddr
.It Dv DLPCMD_MODNSFLAG_NETMASK
.Fa newinfo.hostnetmasksize
and
.Fa newinfo.hostnetmask
.El
.Sh RETURN VALUE
These functions return 0 if successful, or a negative value otherwise.
.Sh SEE ALSO
.Xr libpconn 3 .
|