Overview
| Comment: | Updated to name service we create "npf", which is what winpcap expects to find and creates if not present |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
8f671ec548d63755846863d16f8fb568 |
| User & Date: | rkeene on 2014-01-25 06:27:03.159 |
| Other Links: | manifest | tags |
Context
|
2014-01-25
| ||
| 06:40 | Cleaned up check-in: eda3d468e1 user: rkeene tags: trunk | |
| 06:27 | Updated to name service we create "npf", which is what winpcap expects to find and creates if not present check-in: 8f671ec548 user: rkeene tags: trunk | |
| 05:17 | Added checksum verification for downloads check-in: b69c1be66d user: rkeene tags: trunk | |
Changes
Modified main.tcl
from [3ddbc51628]
to [836be22022].
| ︙ | ︙ | |||
34 35 36 37 38 39 40 |
} else {
if {$tcl_platform(platform) == "windows"} {
set tmpdir {C:/TEMP}
} else {
set tmpdir /tmp
}
}
| < | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
} else {
if {$tcl_platform(platform) == "windows"} {
set tmpdir {C:/TEMP}
} else {
set tmpdir /tmp
}
}
# Determine interface to lookup
set dest_parm_idx [lsearch -exact $argv "-i"]
if {$dest_parm_idx != -1} {
incr dest_parm_idx
set dest_chk [lindex $argv $dest_parm_idx]
|
| ︙ | ︙ | |||
79 80 81 82 83 84 85 |
# Run tcpdump
set exit 1
set start_npf_service 0
set npf_failed 0
if {[catch {
set filesdir [file join $dstdir files]
| | < < | < | | < < < < < < < | | < | > | > | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# Run tcpdump
set exit 1
set start_npf_service 0
set npf_failed 0
if {[catch {
set filesdir [file join $dstdir files]
file mkdir $dstdir
file copy -- $srcdir $filesdir
## Delete extraneous service
catch {
::twapi::stop_service npf
}
catch {
::twapi::delete_service npf
}
## Install driver and start service
if {[catch {
set driver [file join $filesdir npf${bits}.sys]
set driver [file nativename $driver]
::twapi::create_service npf $driver -displayname "WinPcap Packet Driver (NPF)" -servicetype kernel_driver -starttype demand_start -errorcontrol ignore
set started [::twapi::start_service npf -wait 60000]
if {!$started} {
error "npf did not start"
}
} npf_err]} {
set npf_failed 1
}
after 5000
## Launch tcpdump with the apropriate parameters
|
| ︙ | ︙ | |||
132 133 134 135 136 137 138 | } puts "Failed: $::errorInfo" set exit 1 } | < < < | | < < < < < < | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
}
puts "Failed: $::errorInfo"
set exit 1
}
# Cleanup
catch {
::twapi::stop_service npf
}
catch {
::twapi::delete_service npf
}
catch {
file delete -force -- $dstdir
}
# Terminate
exit $exit
|