---
name: "DlpReadNetSyncInfo"
section: "3"
platform: "linux"
package: "coldsync"
version: "3.0+pre3-3"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/DlpReadNetSyncInfo"
---

# DlpReadNetSyncInfo(3)

read/write network HotSync information to a PalmOS device

## NAME

**DlpReadNetSyncInfo**, **DlpWriteNetSyncInfo** – read/write network HotSync information to a PalmOS device

## LIBRARY

*libpconn*

## SYNOPSIS

**#include \<palm.h\>**

**#include \<pconn/pconn.h\>**

*int*\

**DlpReadNetSyncInfo**(*PConnection \*pconn*, *struct dlp\_netsyncinfo \*netsyncinfo*);

*int*\

**DlpWriteNetSyncInfo**(*PConnection \*pconn*, *const ubyte modflags*, *const struct dlp\_netsyncinfo \*newinfo*);

## DESCRIPTION

**DlpReadNetSyncInfo** reads network HotSync settings from a Palm.

*netsyncinfo* is filled in with this information. The *dlp\_netsyncinfo* structure is defined as

```
struct dlp_netsyncinfo
{
        ubyte lansync_on;
        uword hostnamesize;
        uword hostaddrsize;
        uword hostnetmasksize;
        char hostname[DLPCMD_MAXHOSTNAMELEN];
        char hostaddr[DLPCMD_MAXADDRLEN];
        char hostnetmask[DLPCMD_MAXNETMASKLEN];
};
```

where *lansync\_on* is non-zero if LAN sync is enabled; *hostnamesize*, *hostaddrsize*, and *hostnetmasksize* give the length of the strings in *hostname*, *hostaddr*, and *hostnetmask*, respectively (these lengths include the terminating NUL); *hostname* is filled in with the name of the sync host, as an ASCII string; *hostaddr* is filled in with the IP address of the sync host, as an ASCII string, *e.g*, “192.168.123.5”; *hostnetmask* is filled in with the sync host's netmask, as an ASCII string, *e.g.*, “255.255.0.0”.

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.

**DlpWriteNetSyncInfo** writes new network HotSync information to the Palm.

*newinfo* contains the data to upload. It is not necessary to fill in all of the fields, only those which one wishes to modify.

*modflags* specifies which fields to update:

- DLPCMD\_MODNSFLAG\_LANSYNC

  *newinfo.lansync\_on*

- DLPCMD\_MODNSFLAG\_HOSTNAME

  *newinfo.hostnamesize* and *newinfo.hostname*

- DLPCMD\_MODNSFLAG\_HOSTADDR

  *newinfo.hostaddrsize* and *newinfo.hostaddr*

- DLPCMD\_MODNSFLAG\_NETMASK

  *newinfo.hostnetmasksize* and *newinfo.hostnetmask*

## RETURN VALUE

These functions return 0 if successful, or a negative value otherwise.

## SEE ALSO

[libpconn(3)](/libpconn/3.md).
