aboutsummaryrefslogtreecommitdiff
path: root/pcap.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-01-16 00:42:46 -0800
committerGitHub <noreply@github.com>2023-01-16 00:42:46 -0800
commit7b955929deb75804ec74dffc2934cbef7c1196c6 (patch)
treed2041a9baf6050d454b13871c9be66e9a5c2cad1 /pcap.c
parent56b17aaab04148851bd3ea0f7580c0834dc49906 (diff)
parenta9487778d264f8e272ddb6c8b9dc4897a05d4fdb (diff)
Merge pull request #1142 from hansleidekker/mmap
Add an option to force memory-mapped buffers to be mapped as accessible to 32-bit code
Diffstat (limited to 'pcap.c')
-rw-r--r--pcap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pcap.c b/pcap.c
index 005103b9..86246048 100644
--- a/pcap.c
+++ b/pcap.c
@@ -230,6 +230,7 @@ pcap_wsockinit(void)
*/
int pcap_new_api; /* pcap_lookupdev() always fails */
int pcap_utf_8_mode; /* Strings should be in UTF-8. */
+int pcap_mmap_32bit; /* Map packet buffers with 32-bit addresses. */
int
pcap_init(unsigned int opts, char *errbuf)
@@ -267,6 +268,10 @@ pcap_init(unsigned int opts, char *errbuf)
pcap_utf_8_mode = 1;
break;
+ case PCAP_MMAP_32BIT:
+ pcap_mmap_32bit = 1;
+ break;
+
default:
snprintf(errbuf, PCAP_ERRBUF_SIZE, "Unknown options specified");
return (PCAP_ERROR);