* Fixed size of sdl_type/sdl_e_type, the former is only a uint8, and the latter
a uint16. * sdl_e_type is stored in network order now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39778 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -77,8 +77,8 @@ public:
|
|||||||
void SetToLinkLevel(const char* name);
|
void SetToLinkLevel(const char* name);
|
||||||
void SetToLinkLevel(uint32 index);
|
void SetToLinkLevel(uint32 index);
|
||||||
void SetLinkLevelIndex(uint32 index);
|
void SetLinkLevelIndex(uint32 index);
|
||||||
void SetLinkLevelType(uint32 type);
|
void SetLinkLevelType(uint8 type);
|
||||||
void SetLinkLevelFrameType(uint32 frameType);
|
void SetLinkLevelFrameType(uint16 frameType);
|
||||||
|
|
||||||
int Family() const;
|
int Family() const;
|
||||||
uint16 Port() const;
|
uint16 Port() const;
|
||||||
@@ -103,8 +103,8 @@ public:
|
|||||||
|
|
||||||
uint32 LinkLevelIndex() const;
|
uint32 LinkLevelIndex() const;
|
||||||
BString LinkLevelInterface() const;
|
BString LinkLevelInterface() const;
|
||||||
uint32 LinkLevelType() const;
|
uint8 LinkLevelType() const;
|
||||||
uint32 LinkLevelFrameType() const;
|
uint16 LinkLevelFrameType() const;
|
||||||
uint8* LinkLevelAddress() const;
|
uint8* LinkLevelAddress() const;
|
||||||
size_t LinkLevelAddressLength() const;
|
size_t LinkLevelAddressLength() const;
|
||||||
|
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ BNetworkAddress::SetLinkLevelIndex(uint32 index)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BNetworkAddress::SetLinkLevelType(uint32 type)
|
BNetworkAddress::SetLinkLevelType(uint8 type)
|
||||||
{
|
{
|
||||||
sockaddr_dl& link = (sockaddr_dl&)fAddress;
|
sockaddr_dl& link = (sockaddr_dl&)fAddress;
|
||||||
link.sdl_type = type;
|
link.sdl_type = type;
|
||||||
@@ -501,10 +501,10 @@ BNetworkAddress::SetLinkLevelType(uint32 type)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BNetworkAddress::SetLinkLevelFrameType(uint32 frameType)
|
BNetworkAddress::SetLinkLevelFrameType(uint16 frameType)
|
||||||
{
|
{
|
||||||
sockaddr_dl& link = (sockaddr_dl&)fAddress;
|
sockaddr_dl& link = (sockaddr_dl&)fAddress;
|
||||||
link.sdl_e_type = frameType;
|
link.sdl_e_type = htons(frameType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -791,17 +791,17 @@ BNetworkAddress::LinkLevelInterface() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32
|
uint8
|
||||||
BNetworkAddress::LinkLevelType() const
|
BNetworkAddress::LinkLevelType() const
|
||||||
{
|
{
|
||||||
return ((sockaddr_dl&)fAddress).sdl_type;
|
return ((sockaddr_dl&)fAddress).sdl_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32
|
uint16
|
||||||
BNetworkAddress::LinkLevelFrameType() const
|
BNetworkAddress::LinkLevelFrameType() const
|
||||||
{
|
{
|
||||||
return ((sockaddr_dl&)fAddress).sdl_e_type;
|
return ntohs(((sockaddr_dl&)fAddress).sdl_e_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user