ppp: Basic build fixes on x86_64
This commit is contained in:
parent
c931e464e8
commit
ceff2b88ae
@ -373,7 +373,8 @@ dialup_send_data(net_device* _device, net_buffer* buffer)
|
||||
if (device->fd == -1)
|
||||
return B_FILE_ERROR;
|
||||
|
||||
dprintf("try to send HDLC packet of %lu bytes (flags %ld):\n", buffer->size, buffer->flags);
|
||||
dprintf("try to send HDLC packet of %" B_PRIu32 " bytes "
|
||||
"(flags 0x%" B_PRIx32 "):\n", buffer->size, buffer->flags);
|
||||
|
||||
if (buffer->size < HDLC_HEADER_LENGTH)
|
||||
return B_BAD_VALUE;
|
||||
|
@ -24,7 +24,6 @@ UseHeaders [ FDirName $(HAIKU_TOP) src add-ons kernel network ppp pppoe
|
||||
] : true ;
|
||||
|
||||
KernelAddon ipcp :
|
||||
atomic.S
|
||||
kernel_cpp.cpp
|
||||
|
||||
# imported from kernel util
|
||||
@ -40,8 +39,6 @@ SEARCH on [ FGristFiles inet_addr.c ]
|
||||
|
||||
SEARCH on [ FGristFiles kernel_cpp.cpp ]
|
||||
= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
|
||||
SEARCH on [ FGristFiles atomic.S ]
|
||||
= [ FDirName $(HAIKU_TOP) src system libroot os arch $(TARGET_ARCH) ] ;
|
||||
|
||||
LinkAgainst ipcp : libkernelppp.a ;
|
||||
|
||||
|
@ -153,7 +153,7 @@ IPCP::StackControl(uint32 op, void *data)
|
||||
break;
|
||||
|
||||
default:
|
||||
ERROR("IPCP: Unknown ioctl: %ld\n", op);
|
||||
ERROR("IPCP: Unknown ioctl: %" B_PRIu32 "\n", op);
|
||||
return KPPPProtocol::StackControl(op, data);
|
||||
}
|
||||
|
||||
|
@ -71,9 +71,9 @@ ppp_init(const char *name, net_device **_device)
|
||||
|
||||
if (idInterface <= 0 || pppInterface == NULL) {
|
||||
if (idInterface <= 0)
|
||||
dprintf("%s: idInterface:%ld\n", __func__, idInterface);
|
||||
dprintf("%s: idInterface: %" B_PRIu32 "\n", __func__, idInterface);
|
||||
else
|
||||
dprintf("%s: pppInterface == NULL %ld\n", __func__, idInterface);
|
||||
dprintf("%s: pppInterface == NULL %" B_PRIu32 "\n", __func__, idInterface);
|
||||
put_module(NET_BUFFER_MODULE_NAME);
|
||||
return B_NO_MEMORY;
|
||||
}
|
||||
|
@ -34,9 +34,9 @@ DiscoveryPacket::DiscoveryPacket(net_buffer *packet, uint32 start)
|
||||
|
||||
if(length > packet->size - PPPoE_HEADER_SIZE) {
|
||||
dprintf("packet size less than pppoe payload\n");
|
||||
dprintf("pppoe payload:%d\n", length);
|
||||
dprintf("PPPoE_HEADER_SIZE:%d\n", PPPoE_HEADER_SIZE);
|
||||
dprintf("packet->size:%ld\n", packet->size);
|
||||
dprintf("pppoe payload: %d\n", length);
|
||||
dprintf("PPPoE_HEADER_SIZE: %d\n", PPPoE_HEADER_SIZE);
|
||||
dprintf("packet->size: %" B_PRIu32 "\n", packet->size);
|
||||
fInitStatus = B_ERROR;
|
||||
return;
|
||||
// there are no tags (or one corrupted tag)
|
||||
|
@ -247,8 +247,8 @@ PPPoEDevice::Down()
|
||||
return true;
|
||||
}
|
||||
|
||||
// this tells StateMachine that DownEvent() does not mean we lost connection
|
||||
DownStarted();
|
||||
// this tells StateMachine that DownEvent() does not mean we lost connection
|
||||
|
||||
// create PADT
|
||||
DiscoveryPacket discovery(PADT, SessionID());
|
||||
@ -256,7 +256,8 @@ PPPoEDevice::Down()
|
||||
|
||||
net_buffer *packet = discovery.ToNetBuffer(MTU());
|
||||
if (!packet) {
|
||||
ERROR("PPPoEDevice::Down(): ToNetBuffer() failed; MTU=%ld\n", MTU());
|
||||
ERROR("PPPoEDevice::Down(): ToNetBuffer() failed; MTU=%" B_PRIu32 "\n",
|
||||
MTU());
|
||||
DownEvent();
|
||||
return false;
|
||||
}
|
||||
|
@ -19,14 +19,12 @@ UsePrivateHeaders [ FDirName kernel util ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src add-ons kernel network ppp shared
|
||||
libkernelppp headers ] : true ;
|
||||
|
||||
|
||||
{
|
||||
SubDirC++Flags -fno-rtti ;
|
||||
}
|
||||
|
||||
|
||||
KernelStaticLibrary libkernelppp.a :
|
||||
atomic.S
|
||||
kernel_cpp.cpp
|
||||
|
||||
KPPPConfigurePacket.cpp
|
||||
@ -46,10 +44,7 @@ KernelStaticLibrary libkernelppp.a :
|
||||
_KPPPMRUHandler.cpp
|
||||
_KPPPAuthenticationHandler.cpp
|
||||
_KPPPPFCHandler.cpp
|
||||
: -fno-pic
|
||||
;
|
||||
|
||||
SEARCH on [ FGristFiles kernel_cpp.cpp ]
|
||||
= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
|
||||
SEARCH on [ FGristFiles atomic.S ]
|
||||
= [ FDirName $(HAIKU_TOP) src system libroot os arch $(TARGET_ARCH) ] ;
|
||||
|
@ -90,7 +90,7 @@ KPPPLCP::RemoveOptionHandler(KPPPOptionHandler *optionHandler)
|
||||
KPPPOptionHandler*
|
||||
KPPPLCP::OptionHandlerAt(int32 index) const
|
||||
{
|
||||
dprintf("total optionhandler count %ld\n", CountOptionHandlers());
|
||||
dprintf("total optionhandler count %" B_PRId32 "\n", CountOptionHandlers());
|
||||
KPPPOptionHandler *optionHandler = fOptionHandlers.ItemAt(index);
|
||||
|
||||
if (optionHandler == fOptionHandlers.GetDefaultItem())
|
||||
@ -164,7 +164,7 @@ KPPPLCP::RemoveLCPExtension(KPPPLCPExtension *lcpExtension)
|
||||
KPPPLCPExtension*
|
||||
KPPPLCP::LCPExtensionAt(int32 index) const
|
||||
{
|
||||
dprintf("LCPExtension count %ld\n", CountLCPExtensions());
|
||||
dprintf("LCPExtension count %" B_PRId32 "\n", CountLCPExtensions());
|
||||
KPPPLCPExtension *lcpExtension = fLCPExtensions.ItemAt(index);
|
||||
|
||||
if (lcpExtension == fLCPExtensions.GetDefaultItem())
|
||||
|
@ -1,3 +1,2 @@
|
||||
- remove atomic.S when Haiku is finished
|
||||
- add missing settings support (ConnectRetryDelay, etc.)
|
||||
- finish support for server mode
|
||||
|
@ -348,17 +348,19 @@ PPPManager::Interfaces(int32 *count,
|
||||
while (true) {
|
||||
requestCount = *count = CountInterfaces(filter);
|
||||
if (*count <= 0) {
|
||||
printf("No interface, count, first round:%ld\n", *count);
|
||||
printf("No interface, count, first round: %" B_PRId32 "\n", *count);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
requestCount += 10;
|
||||
// request some more interfaces in case some are added in the mean time
|
||||
// request some more interfaces in case some are added in the mean time
|
||||
interfaces = new ppp_interface_id[requestCount];
|
||||
// printf("interfaces addr: %p\n, requestCount: %ld", interfaces, requestCount);
|
||||
|
||||
//printf("interfaces addr: %p\n, requestCount: %ld", interfaces,
|
||||
// requestCount);
|
||||
*count = GetInterfaces(interfaces, requestCount, filter);
|
||||
if (*count <= 0) {
|
||||
printf("No interface, count second round:%ld\n", *count);
|
||||
printf("No interface, count second round: %" B_PRId32 "\n", *count);
|
||||
delete interfaces;
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user