Changeset c7bd3f9e in mainline
- Timestamp:
- 2024-12-13T08:33:36Z (13 months ago)
- Children:
- fc2d593
- Parents:
- 6c60a7c
- git-author:
- Nataliia Korop <n.corop08@…> (2024-04-16 09:58:50)
- git-committer:
- Nataliia Korop <n.corop08@…> (2024-12-13 08:33:36)
- Location:
- uspace/lib/pcap
- Files:
-
- 3 edited
-
include/pcap.h (modified) (1 diff)
-
include/pcap_iface.h (modified) (1 diff)
-
src/pcap.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcap/include/pcap.h
r6c60a7c rc7bd3f9e 53 53 54 54 #define PCAP_LINKTYPE_ETHERNET 1 /* IEEE 802.3 Ethernet*/ 55 #define PCAP_LINKTYPE_IP_RAW 101 55 56 56 57 /** Header of the .pcap file -
uspace/lib/pcap/include/pcap_iface.h
r6c60a7c rc7bd3f9e 48 48 extern void pcap_close_file(void); 49 49 extern errno_t pcap_iface_init(pcap_iface_t *); 50 //init to file 51 //init to serial 52 //add packet, dostane strukturu, data, velikost ... to to this pcap_iface_t 53 // v ramci init jeste linktype prg 54 //set snaplen taky lze pridavat prg 55 //create kam posila 56 // init 50 57 extern errno_t pcap_init(const char *); 51 58 extern void pcap_add_packet(const void *data, size_t size); -
uspace/lib/pcap/src/pcap.c
r6c60a7c rc7bd3f9e 59 59 { 60 60 pcap_file_header_t file_header = { PCAP_MAGIC_MICRO, PCAP_MAJOR_VERSION, PCAP_MINOR_VERSION, 61 0x00000000, 0x00000000, (uint32_t)PCAP_SNAP_LEN, (uint32_t)PCAP_LINKTYPE_ ETHERNET};61 0x00000000, 0x00000000, (uint32_t)PCAP_SNAP_LEN, (uint32_t)PCAP_LINKTYPE_IP_RAW }; 62 62 writer->ops->write_buffer(writer, &file_header, sizeof(file_header)); 63 63 }
Note:
See TracChangeset
for help on using the changeset viewer.
