netatalk: atalk_addr.c File Reference

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
atalk_addr.c File Reference
`#include <arpa/inet.h>`
`#include <sys/types.h>`
`#include <netatalk/at.h>`
`#include <atalk/util.h>`
`#include <ctype.h>`

## Functions
int | atalk_aton (char *cp, struct at_addr *addr)
| Check whether "cp" is a valid ascii representation of an AppleTalk address and convert to a binary address.

## Function Documentation

## ◆ atalk_aton()

int atalk_aton | ( | char * | cp,
|  | struct at_addr * | addr )

Check whether "cp" is a valid ascii representation of an AppleTalk address and convert to a binary address.

Examples of accepted forms are (in decimal, net of 4321, node of 65):

4321.65
0x10E1.41
16.225.65
0x10.E1.41

If hex is used, and the first digit is one of A-F, the leading 0x is redundant. Returns 1 if the address is valid, 0 if not.

Unlike Internet addresses, AppleTalk addresses can have leading 0's. This means that we can't support octal addressing.