summaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-13 18:38:54 -0700
committerJosh Blum <josh@joshknows.com>2010-10-13 18:38:54 -0700
commit376e22ca3bf25c8d6bb53cd987b245e5b79860f9 (patch)
treea4327cbfb953a8bd860f54187bf96642a664b656 /firmware/microblaze/lib
parentc25fd486f82d646cf8a08582c6e7105fd3c58c45 (diff)
downloaduhd-376e22ca3bf25c8d6bb53cd987b245e5b79860f9.tar.gz
uhd-376e22ca3bf25c8d6bb53cd987b245e5b79860f9.tar.bz2
uhd-376e22ca3bf25c8d6bb53cd987b245e5b79860f9.zip
usrp2: handle destination port unreachable icmp in fw (kills streaming and update packets)
Diffstat (limited to 'firmware/microblaze/lib')
-rw-r--r--firmware/microblaze/lib/net_common.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/firmware/microblaze/lib/net_common.c b/firmware/microblaze/lib/net_common.c
index 6c9509c92..0efb26639 100644
--- a/firmware/microblaze/lib/net_common.c
+++ b/firmware/microblaze/lib/net_common.c
@@ -291,8 +291,17 @@ handle_icmp_packet(struct ip_addr src, struct ip_addr dst,
{
switch (icmp->type){
case ICMP_DUR: // Destinatino Unreachable
- //stop_streaming(); //FIXME
if (icmp->code == ICMP_DUR_PORT){ // port unreachable
+ //handle destination port unreachable (the host ctrl+c'd the app):
+
+ //end async update packets per second
+ sr_tx_ctrl->cyc_per_up = 0;
+
+ //the end continuous streaming command
+ sr_rx_ctrl->cmd = (1 << 31) | 1; //one sample, asap
+ sr_rx_ctrl->time_secs = 0;
+ sr_rx_ctrl->time_ticks = 0; //latch the command
+
//struct udp_hdr *udp = (struct udp_hdr *)((char *)icmp + 28);
//printf("icmp port unr %d\n", udp->dest);
putchar('i');