Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
ip6/icmp/dest6.cpp
- Committer:
- andrewboyson
- Date:
- 2017-11-28
- Revision:
- 57:e0fb648acf48
File content as of revision 57:e0fb648acf48:
#include "mbed.h"
#include "log.h"
#include "net.h"
#include "action.h"
bool Dest6Trace = false;
static void logCode(uint8_t code)
{
switch (code)
{
case 0: Log ("No route to destination" ); break;
case 1: Log ("Communication with destination administratively prohibited"); break;
case 2: Log ("Beyond scope of source address" ); break;
case 3: Log ("Address unreachable" ); break;
case 4: Log ("Port unreachable" ); break;
case 5: Log ("Source address failed ingress/egress policy" ); break;
case 6: Log ("Reject route to destination" ); break;
default: LogF("Unknown code %u", code ); break;
}
}
int Dest6HandleRequest(void (*traceback)(void), uint8_t* pType, uint8_t* pCode)
{
if (Dest6Trace)
{
if (NetTraceNewLine) Log("\r\n");
LogTime("Dest6 - Destination unreacheable - "); logCode(*pCode); Log("\r\n");
if (NetTraceStack) traceback();
}
return DO_NOTHING;
}