Internet Control Message Protocol.
More...
|
thread | icmpDaemon (void) |
|
syscall | icmpDestUnreach (const struct packet *unreached, uchar code) |
|
syscall | icmpEchoRequest (struct netaddr *dst, ushort id, ushort seq) |
|
syscall | icmpInit (void) |
|
syscall | icmpRecv (struct packet *pkt) |
|
syscall | icmpRedirect (struct packet *redir, uchar code, struct rtEntry *route) |
|
syscall | icmpSend (struct packet *pkt, uchar type, uchar code, uint datalen, struct netaddr *src, struct netaddr *dst) |
|
syscall | icmpTimeExceeded (struct packet *unreached, uchar code) |
|
Internet Control Message Protocol.
thread icmpDaemon |
( |
void |
| ) |
|
Daemon that responds to ICMP echo requests (pings).
syscall icmpDestUnreach |
( |
const struct packet * |
unreached, |
|
|
uchar |
code |
|
) |
| |
Compose ICMP Destination Unreachable message.
- Parameters
-
unreached | packet that could not be sent |
code | ICMP destination unreachable code number |
- Returns
- OK if packet was sent, otherwise SYSERR
syscall icmpEchoRequest |
( |
struct netaddr * |
dst, |
|
|
ushort |
id, |
|
|
ushort |
seq |
|
) |
| |
Send an ICMP Echo (Ping) Request.
- Parameters
-
dst | destination address |
id | ping stream identifier |
seq | sequence number |
- Returns
- OK if packet was sent, otherwise SYSERR
syscall icmpInit |
( |
void |
| ) |
|
Initializes ICMP daemon.
- Returns
- OK if initialization is successful, otherwise SYSERR
syscall icmpRecv |
( |
struct packet * |
pkt | ) |
|
Processes an incoming ICMP packet.
- Parameters
-
pkt | pointer to the incoming packet return OK if packet was processed succesfully, otherwise SYSERR |
syscall icmpRedirect |
( |
struct packet * |
redir, |
|
|
uchar |
code, |
|
|
struct rtEntry * |
route |
|
) |
| |
Compose ICMP Redirect message.
- Parameters
-
redir | packet that should have gone somewhere else |
code | ICMP redirect code number |
route | new gateway for packet |
- Returns
- OK if packet was sent, otherwise SYSERR
syscall icmpSend |
( |
struct packet * |
pkt, |
|
|
uchar |
type, |
|
|
uchar |
code, |
|
|
uint |
datalen, |
|
|
struct netaddr * |
src, |
|
|
struct netaddr * |
dst |
|
) |
| |
Send an ICMP (Internet Control Message Protocol) packet.
- Parameters
-
pkt | Packet containing the ICMP data. pkt->curr must be positioned on the ICMP data, pkt->len must be the length of the ICMP data, and there must be at least enough space between pkt->data and pkt->curr for the ICMP, IPv4, and link-level headers to be attached. |
type | ICMP type field to use. |
code | ICMP code field to use. |
datalen | Length of the ICMP data payload. |
src | Source network address. If src->type == 0, then the source is automatically set to the address of the interface on which the packet is sent. dst Destination network address. |
- Returns
- ::OK if packet was successfully sent; otherwise ::SYSERR or another error code returned by ipv4Send().
syscall icmpTimeExceeded |
( |
struct packet * |
unreached, |
|
|
uchar |
code |
|
) |
| |
Compose ICMP Time Exceeded message.
- Parameters
-
unreached | packet that could not be sent |
code | ICMP destination unreachable code number |
- Returns
- OK if packet was sent, otherwise SYSERR