peapod  0.1.0
EAPOL Proxy Daemon
All Data Structures Files Functions Variables Macros Pages
Functions
proxy.h File Reference

Function prototypes for proxy.c. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void proxy (struct iface_t *ifaces)
 Main event loop. More...
 

Detailed Description

Function prototypes for proxy.c.

Function Documentation

void proxy ( struct iface_t ifaces)

Main event loop.

The loop flow approximates the following:

  1. Ingress phase: Receive an EAPOL packet (packet) on a configured interface (iface).
    packet is an Ethernet frame containing an EAPOL MPDU and iface is a network interface configured in the config file.
    • If packet is the first EAPOL packet to be received on iface, and any other interfaces are configured to have their MAC address set from the source MAC address of such a packet:
      • Set each such interface's MAC address.
      • Drop packet entirely and restart the loop.
    • If iface has an ingress script defined matching the EAPOL Packet Type or EAP Code of packet, execute the ingress script.
    • If iface has an ingress filter defined matching packet, apply the ingress filter (i.e. drop packet entirely and restart the loop).
  2. Egress phase: Proxy to other configured interfaces ("egress interfaces").
    For each egress interface (eiface):
    • Make a local copy of packet (epacket).
    • If eiface has a dot1q option defined, add/change/remove the 802.1Q VLAN tag in epacket.
    • If eiface has an egress filter defined matching epacket, apply the egress filter.
      This means dropping epacket entirely on eiface and moving on to proxying packet on the next egress interface.
    • If eiface has an egress script defined matching epacket, execute the egress script.
    • Send epacket on eiface.
  3. Restart the loop.
Parameters
ifacesPointer to a list of struct iface_t structures representing network interfaces