mirror of
https://github.com/ipxe/ipxe
synced 2026-02-28 03:11:18 +03:00
Convert some trivial functions to static inlines.
This commit is contained in:
@@ -38,34 +38,6 @@ int udp_bind ( struct udp_connection *conn, uint16_t local_port ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind UDP connection to all local ports
|
||||
*
|
||||
* @v conn UDP connection
|
||||
*
|
||||
* A promiscuous UDP connection will receive packets with any
|
||||
* destination UDP port. This is required in order to support the PXE
|
||||
* UDP API.
|
||||
*
|
||||
* If the promiscuous connection is not the only UDP connection, the
|
||||
* behaviour is undefined.
|
||||
*/
|
||||
void udp_bind_promisc ( struct udp_connection *conn ) {
|
||||
conn->local_port = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect UDP connection to remote host and port
|
||||
*
|
||||
* @v conn UDP connection
|
||||
* @v peer Destination socket address
|
||||
*
|
||||
* This function stores the socket address within the connection
|
||||
*/
|
||||
void udp_connect ( struct udp_connection *conn, struct sockaddr_tcpip *peer ) {
|
||||
memcpy ( &conn->peer, peer, sizeof ( conn->peer ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a local port
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user