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