mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +00:00
Kernel: Move IPv4SocketTuple into the Kernel namespace
This class was accidentally declared in the global namespace.
This commit is contained in:
parent
bc85b64a38
commit
b84444cbb3
1 changed files with 6 additions and 2 deletions
|
@ -13,6 +13,8 @@
|
||||||
#include <Kernel/Net/IPv4.h>
|
#include <Kernel/Net/IPv4.h>
|
||||||
#include <Kernel/Net/Socket.h>
|
#include <Kernel/Net/Socket.h>
|
||||||
|
|
||||||
|
namespace Kernel {
|
||||||
|
|
||||||
class IPv4SocketTuple {
|
class IPv4SocketTuple {
|
||||||
public:
|
public:
|
||||||
IPv4SocketTuple(IPv4Address local_address, u16 local_port, IPv4Address peer_address, u16 peer_port)
|
IPv4SocketTuple(IPv4Address local_address, u16 local_port, IPv4Address peer_address, u16 peer_port)
|
||||||
|
@ -48,11 +50,13 @@ private:
|
||||||
u16 m_peer_port { 0 };
|
u16 m_peer_port { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct Traits<IPv4SocketTuple> : public GenericTraits<IPv4SocketTuple> {
|
struct Traits<Kernel::IPv4SocketTuple> : public GenericTraits<Kernel::IPv4SocketTuple> {
|
||||||
static unsigned hash(const IPv4SocketTuple& tuple)
|
static unsigned hash(const Kernel::IPv4SocketTuple& tuple)
|
||||||
{
|
{
|
||||||
auto h1 = pair_int_hash(tuple.local_address().to_u32(), tuple.local_port());
|
auto h1 = pair_int_hash(tuple.local_address().to_u32(), tuple.local_port());
|
||||||
auto h2 = pair_int_hash(tuple.peer_address().to_u32(), tuple.peer_port());
|
auto h2 = pair_int_hash(tuple.peer_address().to_u32(), tuple.peer_port());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue