Changeset 6c60a7c in mainline for uspace/srv/net/inetsrv/inetsrv.c
- Timestamp:
- 2024-12-13T08:33:34Z (15 months ago)
- Children:
- c7bd3f9e
- Parents:
- 1a59a89
- git-author:
- Nataliia Korop <n.corop08@…> (2024-04-11 09:36:03)
- git-committer:
- Nataliia Korop <n.corop08@…> (2024-12-13 08:33:34)
- File:
-
- 1 edited
-
uspace/srv/net/inetsrv/inetsrv.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inetsrv/inetsrv.c
r1a59a89 r6c60a7c 49 49 #include <stdint.h> 50 50 #include <task.h> 51 #include <pcapdump_iface.h> 51 52 #include "addrobj.h" 52 53 #include "icmp.h" … … 63 64 #define NAME "inetsrv" 64 65 66 /** Interface for dumping packets */ 67 pcap_iface_t pcapdump; 68 65 69 static inet_naddr_t solicited_node_mask = { 66 70 .version = ip_v6, … … 117 121 if (rc != EOK) 118 122 return rc; 119 123 rc = async_create_port(INTERFACE_PCAP_CONTROL, 124 pcapdump_conn, &pcapdump, &port); 125 if (rc != EOK) { 126 return rc; 127 } 120 128 rc = loc_server_register(NAME, &srv); 121 129 if (rc != EOK) { … … 202 210 dgram->dest.addr, dgram, proto, ttl, df); 203 211 } 204 212 printf("SENDING: packet size is - %d\n", dgram->size); 213 pcapdump_packet(&pcapdump, dgram->data, dgram->size); 205 214 log_msg(LOG_DEFAULT, LVL_DEBUG, "dgram to be routed"); 206 215 … … 541 550 dgram.data = packet->data; 542 551 dgram.size = packet->size; 543 552 printf("RECEIVING: packet size is - %d\n", packet->size); 553 pcapdump_packet(&pcapdump, packet->data, packet->size); 544 554 return inet_recv_dgram_local(&dgram, packet->proto); 545 555 } else { … … 562 572 return 1; 563 573 } 564 574 rc = pcap_iface_init(&pcapdump); 575 576 if (rc != EOK) { 577 printf("Failed creating pcap interface: %s", str_error(rc)); 578 return rc; 579 } 565 580 rc = inet_init(); 566 581 if (rc != EOK) 567 582 return 1; 568 583 584 printf(NAME ": Initialized dump iface from inetsrv.\n"); 569 585 printf(NAME ": Accepting connections.\n"); 570 586
Note:
See TracChangeset
for help on using the changeset viewer.
