File tree 4 files changed +16
-11
lines changed
4 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ public override void Open(DeviceConfiguration configuration)
135
135
136
136
if ( Handle . IsInvalid )
137
137
{
138
- var err = $ "Unable to open the adapter '{ Name } '. { errbuf } ";
138
+ var err = $ "Unable to open the adapter '{ Name } ' using pcap_create . { errbuf } ";
139
139
throw new PcapException ( err ) ;
140
140
}
141
141
// Those are configurations that pcap_open can handle differently
@@ -171,20 +171,20 @@ public override void Open(DeviceConfiguration configuration)
171
171
( short ) mode , // flags
172
172
( short ) configuration . ReadTimeout , // read timeout
173
173
ref auth , // authentication
174
- out errbuf ) ; // error buffer
174
+ out errbuf ) ; // error buffer
175
175
}
176
176
catch ( TypeLoadException )
177
177
{
178
178
var reason = credentials != null ? "Remote PCAP" : "Requested DeviceModes" ;
179
- var err = $ "Unable to open the adapter '{ Name } '. { reason } not supported";
179
+ var err = $ "Unable to open the adapter '{ Name } '. { reason } is not supported";
180
180
throw new PcapException ( err , PcapError . PlatformNotSupported ) ;
181
181
}
182
- }
183
182
184
- if ( Handle . IsInvalid )
185
- {
186
- var err = $ "Unable to open the adapter '{ Name } '. { errbuf } ";
187
- throw new PcapException ( err ) ;
183
+ if ( Handle . IsInvalid )
184
+ {
185
+ var err = $ "Unable to open the adapter '{ Name } ' using pcap_open. { errbuf } ";
186
+ throw new PcapException ( err ) ;
187
+ }
188
188
}
189
189
190
190
ConfigureIfCompatible ( use_pcap_create ,
Original file line number Diff line number Diff line change @@ -126,7 +126,11 @@ public void NonCompatibleModes()
126
126
var ex = Assert . Throws < PcapException > ( ( ) => device . Open ( config ) ) ;
127
127
if ( ex . Error != PcapError . PlatformNotSupported )
128
128
{
129
- Assert . That ( ex . Message , Does . Contain ( nameof ( DeviceConfiguration . BufferSize ) ) ) ;
129
+ Assert . That (
130
+ ex . Message ,
131
+ Does . Contain ( nameof ( DeviceConfiguration . BufferSize ) )
132
+ . Or . Contain ( "using pcap_open" )
133
+ ) ;
130
134
}
131
135
}
132
136
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ SPDX-License-Identifier: MIT
10
10
<AllowUnsafeBlocks >true</AllowUnsafeBlocks >
11
11
<TargetFrameworks >net8.0</TargetFrameworks >
12
12
<TargetFrameworks Condition =" '$(OS)' == 'Windows_NT'" >$(TargetFrameworks);net48</TargetFrameworks >
13
+ <TestTfmsInParallel >false</TestTfmsInParallel >
13
14
<CoverletOutputFormat >opencover</CoverletOutputFormat >
14
15
</PropertyGroup >
15
16
<ItemGroup >
Original file line number Diff line number Diff line change 19
19
jobs :
20
20
- job : linux
21
21
pool :
22
- vmImage : ubuntu-20 .04
22
+ vmImage : ubuntu-24 .04
23
23
steps :
24
24
- script : sudo -E bash scripts/install-libpcap.sh
25
25
- script : sudo -E bash scripts/install-tap.sh
29
29
30
30
- job : macos
31
31
pool :
32
- vmImage : macOS-12
32
+ vmImage : macOS-14
33
33
steps :
34
34
- script : sudo -E bash scripts/install-libpcap.sh
35
35
- script : sudo sysctl -w net.inet.udp.maxdgram=65535
You can’t perform that action at this time.
0 commit comments