authenticator_misc.c
error_t ethAcceptMacAddr(NetInterface *interface, const MacAddr *macAddr)
Add a unicast/multicast address to the MAC filter table.
Definition: ethernet.c:594
void radiusDumpPacket(const RadiusPacket *packet, size_t length)
Dump RADIUS packet for debugging purpose.
Definition: radius_debug.c:259
void eapDumpHeader(const EapPacket *header)
Dump EAP header for debugging purpose.
Definition: eap_debug.c:105
@ AUTHENTICATOR_TERMINATE_CAUSE_PORT_FAILURE
Definition: authenticator.h:216
void authenticatorGeneratePortAddr(AuthenticatorPort *port)
Port's MAC address generation.
Definition: authenticator_misc.c:132
error_t authenticatorSendRadiusRequest(AuthenticatorPort *port)
Send RADIUS Access-Request packet.
Definition: authenticator_misc.c:752
void authenticatorProcessRadiusPacket(AuthenticatorContext *context)
Process incoming RADIUS packet.
Definition: authenticator_misc.c:807
void md5Final(Md5Context *context, uint8_t *digest)
Finish the MD5 message digest.
Definition: msp432e4_crypto_hash.c:292
error_t authenticatorDropPaeGroupAddr(AuthenticatorContext *context)
Remove the PAE group address from the static MAC table.
Definition: authenticator_misc.c:262
void authenticatorProcessEapPacket(AuthenticatorPort *port, const EapPacket *packet, size_t length)
Process incoming EAP packet.
Definition: authenticator_misc.c:478
uint8_t authenticatorGetNextRadiusId(AuthenticatorContext *context)
Generate a new RADIUS packet identifier.
Definition: authenticator_misc.c:1107
Data logging functions for debugging purpose (RADIUS)
error_t ethDropMacAddr(NetInterface *interface, const MacAddr *macAddr)
Remove a unicast/multicast address from the MAC filter table.
Definition: ethernet.c:666
void md5Init(Md5Context *context)
Initialize MD5 message digest context.
Definition: msp432e4_crypto_hash.c:189
Helper functions for 802.1X authenticator.
Authenticator state machine procedures.
error_t socketSendMsg(Socket *socket, const SocketMsg *message, uint_t flags)
Send a message to a connectionless socket.
Definition: socket.c:1634
Formatting and parsing of RADIUS attributes.
void eapolDumpHeader(const EapolPdu *header)
Dump EAPOL header for debugging purpose.
Definition: eap_debug.c:85
802.1X authenticator
bool_t ipCompAddr(const IpAddr *ipAddr1, const IpAddr *ipAddr2)
Compare IP addresses.
Definition: ip.c:317
const RadiusAttribute * radiusGetAttribute(const RadiusPacket *packet, uint8_t type, uint_t index)
Search a RADIUS packet for a given attribute.
Definition: radius_attributes.c:93
char_t * macAddrToString(const MacAddr *macAddr, char_t *str)
Convert a MAC address to a dash delimited string.
Definition: ethernet.c:919
error_t ipSelectSourceAddr(NetInterface **interface, const IpAddr *destAddr, IpAddr *srcAddr)
IP source address selection.
Definition: ip.c:119
void authenticatorDecrementTimer(uint_t *x)
Decrement timer value.
Definition: authenticator_procedures.c:312
error_t socketReceiveMsg(Socket *socket, SocketMsg *message, uint_t flags)
Receive a message from a connectionless socket.
Definition: socket.c:1894
error_t netGetMacAddr(NetInterface *interface, MacAddr *macAddr)
Retrieve MAC address.
Definition: net.c:516
error_t authenticatorBuildRadiusRequest(AuthenticatorPort *port)
Build RADIUS Access-Request packet.
Definition: authenticator_misc.c:530
RADIUS (Remote Authentication Dial In User Service)
Authenticator state machine.
error_t authenticatorSendEapolPdu(AuthenticatorPort *port, const uint8_t *pdu, size_t length)
Send EAPOL PDU.
Definition: authenticator_misc.c:314
error_t authenticatorAcceptPaeGroupAddr(AuthenticatorContext *context)
Add the PAE group address to the static MAC table.
Definition: authenticator_misc.c:212
__weak_func void hmacUpdate(HmacContext *context, const void *data, size_t length)
Update the HMAC context with a portion of the message being hashed.
Definition: hmac.c:201
Data logging functions for debugging purpose (EAP)
void authenticatorTick(AuthenticatorContext *context)
Handle periodic operations.
Definition: authenticator_misc.c:57
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
Definition: os_port_chibios.c:396
__weak_func void hmacFinal(HmacContext *context, uint8_t *digest)
Finish the HMAC calculation.
Definition: hmac.c:218
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
Definition: os_port_chibios.c:408
@ AUTHENTICATOR_TERMINATE_CAUSE_NOT_TERMINATED_YET
Definition: authenticator.h:214
void authenticatorFsm(AuthenticatorContext *context)
Authenticator state machine implementation.
Definition: authenticator_fsm.c:180
bool_t authenticatorGetLinkState(AuthenticatorPort *port)
Get link state.
Definition: authenticator_misc.c:173
void authenticatorProcessEapolPdu(AuthenticatorContext *context)
Process incoming EAPOL PDU.
Definition: authenticator_misc.c:357
__weak_func error_t hmacInit(HmacContext *context, const HashAlgo *hash, const void *key, size_t keyLen)
Initialize HMAC calculation.
Definition: hmac.c:140
void md5Update(Md5Context *context, const void *data, size_t length)
Update the MD5 context with a portion of the message being hashed.
Definition: apm32f4xx_crypto_hash.c:153
Debugging facilities.
void radiusAddAttribute(RadiusPacket *packet, uint8_t type, const void *value, size_t length)
Append an attribute to a RADIUS packet.
Definition: radius_attributes.c:51