@@ -180,7 +180,8 @@ pub struct Tcpv4Protocol {
180180 /// [`Tcpv4ConnectionState::CLOSED`] state, all pending
181181 /// asynchronous operations are signaled, and any buffers used for
182182 /// TCP network traffic are flushed.
183- pub close : unsafe extern "efiapi" fn ( this : * mut Self , close_token : * mut c_void ) -> Status ,
183+ pub close :
184+ unsafe extern "efiapi" fn ( this : * mut Self , close_token : * mut Tcpv4CloseToken ) -> Status ,
184185
185186 /// Abort an asynchronous connection, listen, transmission or
186187 /// receive request.
@@ -197,7 +198,10 @@ pub struct Tcpv4Protocol {
197198 /// by [`Tcpv4Protocol::connect`], [`Tcpv4Protocol::accept`],
198199 /// [`Tcpv4Protocol::transmit`] and [`Tcpv4Protocol::receive`]
199200 /// will be aborted.
200- pub cancel : unsafe extern "efiapi" fn ( this : * mut Self , completion_token : * mut c_void ) -> Status ,
201+ pub cancel : unsafe extern "efiapi" fn (
202+ this : * mut Self ,
203+ completion_token : * mut Tcpv4CompletionToken ,
204+ ) -> Status ,
201205
202206 /// Poll to receive incoming data and transmit outgoing segments.
203207 ///
@@ -420,6 +424,17 @@ pub struct Tcpv4IoToken {
420424 pub packet : Tcpv4Packet ,
421425}
422426
427+ #[ derive( Debug ) ]
428+ #[ repr( C ) ]
429+ pub struct Tcpv4CloseToken {
430+ /// Completion token for the close operation.
431+ pub completion_token : Tcpv4CompletionToken ,
432+ /// Abort the TCP connection on close instead of the standard TCP
433+ /// close process when it is set to TRUE. This option can be used
434+ /// to satisfy a fast disconnect.
435+ pub abort_on_close : Boolean ,
436+ }
437+
423438#[ repr( C ) ]
424439pub union Tcpv4Packet {
425440 /// Pointer to receive data structure.
0 commit comments