net: Rename IFT_TUN to IFT_TUNNEL as on BSD
We already use their value, let's use the name too. Change-Id: I5afbd69923ae3b5e702dfb935a709c3069de5365 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7146 Reviewed-by: Adrien Destugues <[email protected]> Tested-by: Commit checker robot <[email protected]> Reviewed-by: François Revol <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
e26329ce22
commit
71522c937e
@@ -15,7 +15,7 @@
|
|||||||
#define IFT_SLIP 0x1c
|
#define IFT_SLIP 0x1c
|
||||||
#define IFT_LOCALTALK 0x2a
|
#define IFT_LOCALTALK 0x2a
|
||||||
#define IFT_MODEM 0x30
|
#define IFT_MODEM 0x30
|
||||||
#define IFT_TUN 0x83
|
#define IFT_TUNNEL 0x83
|
||||||
#define IFT_L2VLAN 0x87
|
#define IFT_L2VLAN 0x87
|
||||||
#define IFT_BRIDGE 0xd1
|
#define IFT_BRIDGE 0xd1
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ status_t
|
|||||||
loopback_frame_init(struct net_interface*interface, net_domain* domain,
|
loopback_frame_init(struct net_interface*interface, net_domain* domain,
|
||||||
net_datalink_protocol** _protocol)
|
net_datalink_protocol** _protocol)
|
||||||
{
|
{
|
||||||
if (interface->device->type != IFT_LOOP && interface->device->type != IFT_TUN)
|
if (interface->device->type != IFT_LOOP && interface->device->type != IFT_TUNNEL)
|
||||||
return B_BAD_TYPE;
|
return B_BAD_TYPE;
|
||||||
|
|
||||||
loopback_frame_protocol* protocol;
|
loopback_frame_protocol* protocol;
|
||||||
@@ -67,7 +67,7 @@ loopback_frame_init(struct net_interface*interface, net_domain* domain,
|
|||||||
if (interface->device->type == IFT_LOOP) {
|
if (interface->device->type == IFT_LOOP) {
|
||||||
// Locally received buffers don't need a domain device handler, as the
|
// Locally received buffers don't need a domain device handler, as the
|
||||||
// buffer reception is handled internally.
|
// buffer reception is handled internally.
|
||||||
} else if (interface->device->type == IFT_TUN) {
|
} else if (interface->device->type == IFT_TUNNEL) {
|
||||||
status = stack->register_domain_device_handler(
|
status = stack->register_domain_device_handler(
|
||||||
interface->device, B_NET_FRAME_TYPE(IFT_ETHER, ETHER_TYPE_IP), domain);
|
interface->device, B_NET_FRAME_TYPE(IFT_ETHER, ETHER_TYPE_IP), domain);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ tunnel_init(const char* name, net_device** _device)
|
|||||||
device->address.length = ETHER_ADDRESS_LENGTH;
|
device->address.length = ETHER_ADDRESS_LENGTH;
|
||||||
} else {
|
} else {
|
||||||
device->flags = IFF_POINTOPOINT | IFF_LINK;
|
device->flags = IFF_POINTOPOINT | IFF_LINK;
|
||||||
device->type = IFT_TUN;
|
device->type = IFT_TUNNEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t status = gStackModule->init_fifo(&device->send_queue,
|
status_t status = gStackModule->init_fifo(&device->send_queue,
|
||||||
|
|||||||
@@ -833,7 +833,7 @@ init_stack()
|
|||||||
// TODO: for now!
|
// TODO: for now!
|
||||||
register_domain_datalink_protocols(AF_INET, IFT_LOOP,
|
register_domain_datalink_protocols(AF_INET, IFT_LOOP,
|
||||||
"network/datalink_protocols/loopback_frame/v1", NULL);
|
"network/datalink_protocols/loopback_frame/v1", NULL);
|
||||||
register_domain_datalink_protocols(AF_INET, IFT_TUN,
|
register_domain_datalink_protocols(AF_INET, IFT_TUNNEL,
|
||||||
"network/datalink_protocols/loopback_frame/v1", NULL);
|
"network/datalink_protocols/loopback_frame/v1", NULL);
|
||||||
#if 0 // PPP is not (currently) included in the build
|
#if 0 // PPP is not (currently) included in the build
|
||||||
register_domain_datalink_protocols(AF_INET, IFT_PPP,
|
register_domain_datalink_protocols(AF_INET, IFT_PPP,
|
||||||
|
|||||||
Reference in New Issue
Block a user