netatalk: rtmp.c File Reference

netatalk 4.5.1
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
rtmp.c File Reference
`#include <stdlib.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <atalk/logger.h>`
`#include <sys/types.h>`
`#include <sys/param.h>`
`#include <sys/socket.h>`
`#include <sys/ioctl.h>`
`#include <net/if.h>`
`#include <net/route.h>`
`#include <netatalk/at.h>`
`#include <atalk/ddp.h>`
`#include <atalk/atp.h>`
`#include <atalk/rtmp.h>`
`#include "interface.h"`
`#include "gate.h"`
`#include "rtmp.h"`
`#include "zip.h"`
`#include "list.h"`
`#include "atserv.h"`
`#include "route.h"`
`#include "main.h"`

## Functions
void | rtmp_delzonemap (struct rtmptab *rtmp)
static int | rtmp_config (struct rtmp_head *rh, struct interface *iface)
static void | rtmp_delinuse (struct rtmptab *rtmp)
static void | rtmp_addinuse (struct rtmptab *rtmp)
| Add rtmp to the per-interface in-use table.
static int | rtmp_copyzones (struct rtmptab *to, struct rtmptab *from)
| Change the zone mapping to replace "from" with "to".
void | rtmp_free (struct rtmptab *rtmp)
int | rtmp_replace (struct rtmptab **replace_ptr)
| Find a replacement for the structure pointed to by "replace_ptr".
static int | rtmp_new (struct rtmptab *rtmp)
int | rtmp_packet (struct atport *ap, struct sockaddr_at *from, char *data, int len)
int | rtmp_request (struct interface *iface)
int | looproute (struct interface *iface, unsigned int cmd)
int | gateroute (unsigned int command, struct rtmptab *rtmp)
struct rtmptab * | newrt (const struct interface *iface)

## Variables
int | debug

## Function Documentation

## ◆ gateroute()

int gateroute | ( | unsigned int | command,
|  | struct rtmptab * | rtmp )

## ◆ looproute()

int looproute | ( | struct interface * | iface,
|  | unsigned int | cmd )

## ◆ newrt()

struct rtmptab * newrt | ( | const struct interface * | iface | ) |

## ◆ rtmp_addinuse()

void rtmp_addinuse | ( | struct rtmptab * | rtmp | ) |
| static

Add rtmp to the per-interface in-use table.

Note
  No verification is done...

## ◆ rtmp_config()

int rtmp_config | ( | struct rtmp_head * | rh,
|  | struct interface * | iface )
| static

Complete configuration for phase 1 interface using RTMP information.

## ◆ rtmp_copyzones()

int rtmp_copyzones | ( | struct rtmptab * | to,
|  | struct rtmptab * | from )
| static

Change the zone mapping to replace "from" with "to".

Note
  This code assumes the consistency of both the route -> zone map and the zone -> route map. This is probably a bad idea. How can we insure that the data is good at this point? What do we do if we get several copies of a route in an RTMP packet?

## ◆ rtmp_delinuse()

void rtmp_delinuse | ( | struct rtmptab * | rtmp | ) |
| static

Delete rtmp from the per-interface in-use table, remove all zone references, and remove the route from the kernel.

## ◆ rtmp_delzonemap()

void rtmp_delzonemap | ( | struct rtmptab * | rtmp | ) |

## ◆ rtmp_free()

void rtmp_free | ( | struct rtmptab * | rtmp | ) |

Remove rtmp from the in-use table and the per-gate table. Free any associated space.

## ◆ rtmp_new()

int rtmp_new | ( | struct rtmptab * | rtmp | ) |
| static

## ◆ rtmp_packet()

int rtmp_packet | ( | struct atport * | ap,
|  | struct sockaddr_at * | from,
|  | char * | data,
|  | int | len )

## ◆ rtmp_replace()

int rtmp_replace | ( | struct rtmptab ** | replace_ptr | ) |

Find a replacement for the structure pointed to by "replace_ptr".

Returns
  If we can't find a replacement, return 1.
  If we do find a replacement, return 0.
  If we encounter an error, return -1.

## ◆ rtmp_request()

int rtmp_request | ( | struct interface * | iface | ) |

## Variable Documentation

## ◆ debug

int debug
| extern