netatalk: aarp.c File Reference

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
aarp.c File Reference
`#include <sys/types.h>`
`#include <sys/socket.h>`
`#include <syslog.h>`
`#include <sys/param.h>`
`#include <sys/mbuf.h>`
`#include <sys/time.h>`
`#include <sys/kernel.h>`
`#include <net/if.h>`
`#include <net/route.h>`
`#include <net/af.h>`
`#include <netinet/in.h>`
`#include <netinet/if_ether.h>`
`#include "at.h"`
`#include "at_var.h"`
`#include "aarp.h"`
`#include "ddp_var.h"`
`#include "phase2.h"`

## Macros
#define | AARPTAB_BSIZ 9
#define | AARPTAB_NB 19
#define | AARPTAB_SIZE (AARPTAB_BSIZ * AARPTAB_NB)
#define | AARPTAB_HASH(a)
#define | AARPTAB_LOOK(aat, addr)
#define | AARPT_AGE (60 * 1)
#define | AARPT_KILLC 20
#define | AARPT_KILLI 3

## Functions
void | aarptimer (void)
struct ifaddr * | at_ifawithnet (struct sockaddr_at *sat, struct ifaddr *ifa)
void | aarpwhohas (struct arpcom *ac, struct sockaddr_at *sat)
int | aarpresolve (struct arpcom *ac, struct mbuf *m, struct sockaddr_at *destsat, unsigned char *desten)
void | aarpinput (struct arpcom *ac, struct mbuf *m)
void | at_aarpinput (struct arpcom *ac, struct mbuf *m)
void | aarptfree (struct aarptab *aat)
struct aarptab * | aarptnew (struct at_addr *addr)
void | aarpprobe (struct arpcom *ac)
void | aarp_clean (void)

## Variables
struct aarptab | aarptab [AARPTAB_SIZE]
int | aarptab_size = AARPTAB_SIZE
unsigned char | etherbroadcastaddr [6]
unsigned char | atmulticastaddr [6]
unsigned char | at_org_code [3]
unsigned char | aarp_org_code [3]

## Macro Definition Documentation

## ◆ AARPT_AGE

#define AARPT_AGE (60 * 1)

## ◆ AARPT_KILLC

#define AARPT_KILLC 20

## ◆ AARPT_KILLI

#define AARPT_KILLI 3

## ◆ AARPTAB_BSIZ

#define AARPTAB_BSIZ 9

## ◆ AARPTAB_HASH

#define AARPTAB_HASH | ( |  | a | ) |

Value:
((((a).s_net << 8 ) + (a).s_node ) % AARPTAB_NB )
AARPTAB_NB
#define AARPTAB_NB
Definition aarp.c:35

## ◆ AARPTAB_LOOK

#define AARPTAB_LOOK | ( |  | aat,
|  |  | addr )

Value:
{ \
int n; \
aat = &aarptab[ AARPTAB_HASH(addr) * AARPTAB_BSIZ ]; \
for ( n = 0; n < AARPTAB_BSIZ; n++, aat++ ) \
if ( aat->aat_ataddr.s_net == (addr).s_net && \
aat->aat_ataddr.s_node == (addr).s_node ) \
break; \
if ( n >= AARPTAB_BSIZ ) \
aat = 0; \
}
AARPTAB_BSIZ
#define AARPTAB_BSIZ
Definition aarp.c:34
AARPTAB_HASH
#define AARPTAB_HASH(a)
Definition aarp.c:41
addr
int addr(struct interface *iface, char **av)
Definition config.c:643
aarptab
Definition aarp.h:43

## ◆ AARPTAB_NB

#define AARPTAB_NB 19

## ◆ AARPTAB_SIZE

#define AARPTAB_SIZE (AARPTAB_BSIZ * AARPTAB_NB)

## Function Documentation

## ◆ aarp_clean()

void aarp_clean | ( | void |  | ) |

## ◆ aarpinput()

void aarpinput | ( | struct arpcom * | ac,
|  | struct mbuf * | m )

## ◆ aarpprobe()

void aarpprobe | ( | struct arpcom * | ac | ) |

## ◆ aarpresolve()

int aarpresolve | ( | struct arpcom * | ac,
|  | struct mbuf * | m,
|  | struct sockaddr_at * | destsat,
|  | unsigned char * | desten )

## ◆ aarptfree()

void aarptfree | ( | struct aarptab * | aat | ) |

## ◆ aarptimer()

void aarptimer | ( | void |  | ) |

## ◆ aarptnew()

struct aarptab * aarptnew | ( | struct at_addr * | addr | ) |

## ◆ aarpwhohas()

void aarpwhohas | ( | struct arpcom * | ac,
|  | struct sockaddr_at * | sat )

## ◆ at_aarpinput()

void at_aarpinput | ( | struct arpcom * | ac,
|  | struct mbuf * | m )

## ◆ at_ifawithnet()

struct ifaddr * at_ifawithnet | ( | struct sockaddr_at * | sat,
|  | struct ifaddr * | ifa )

## Variable Documentation

## ◆ aarp_org_code

unsigned char aarp_org_code[3]

Initial value:
= {
0x00, 0x00, 0x00,
}

## ◆ aarptab

struct aarptab aarptab[AARPTAB_SIZE]

## ◆ aarptab_size

int aarptab_size = AARPTAB_SIZE

## ◆ at_org_code

unsigned char at_org_code[3]

Initial value:
= {
0x08, 0x00, 0x07,
}

## ◆ atmulticastaddr

unsigned char atmulticastaddr[6]

Initial value:
= {
0x09, 0x00, 0x07, 0xff, 0xff, 0xff,
}

## ◆ etherbroadcastaddr

unsigned char etherbroadcastaddr[6]
| extern