mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 04:42:00 +00:00
Adapter: some info display.
Socket: implemented send and recv. svn path=/trunk/; revision=14544
This commit is contained in:
parent
c0282425ac
commit
d57bccaddf
|
@ -91,7 +91,9 @@ void AdapterInit() {
|
|||
Adapter->DhclientConfig.retry_interval;
|
||||
strncpy(Adapter->DhclientInfo.name, Adapter->IfMib.bDescr,
|
||||
sizeof(Adapter->DhclientInfo.name));
|
||||
DH_DbgPrint(MID_TRACE,("Adapter Name: [%s]\n", Adapter->DhclientInfo.name));
|
||||
DH_DbgPrint(MID_TRACE,("Adapter Name: [%s] (Bind Status %x)\n",
|
||||
Adapter->DhclientInfo.name,
|
||||
Adapter->BindStatus));
|
||||
ifi = &Adapter->DhclientInfo;
|
||||
}
|
||||
}
|
||||
|
@ -156,6 +158,7 @@ PDHCP_ADAPTER AdapterGetNext( PDHCP_ADAPTER This )
|
|||
}
|
||||
|
||||
void if_register_send(struct interface_info *ip) {
|
||||
|
||||
}
|
||||
|
||||
void if_register_receive(struct interface_info *ip) {
|
||||
|
|
|
@ -12,7 +12,18 @@ ssize_t send_packet( struct interface_info *ip,
|
|||
struct in_addr addr,
|
||||
struct sockaddr_in *broadcast,
|
||||
struct hardware *hardware ) {
|
||||
return 0;
|
||||
int result =
|
||||
sendto( ip->wfdesc, (char *)p, size, 0,
|
||||
(struct sockaddr *)broadcast, sizeof(*broadcast) );
|
||||
|
||||
if (result < 0) {
|
||||
note ("send_packet: %x", result);
|
||||
if (result == WSAENETUNREACH)
|
||||
note ("send_packet: please consult README file%s",
|
||||
" regarding broadcast address.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ssize_t receive_packet(struct interface_info *ip,
|
||||
|
@ -20,5 +31,9 @@ ssize_t receive_packet(struct interface_info *ip,
|
|||
size_t packet_len,
|
||||
struct sockaddr_in *dest,
|
||||
struct hardware *hardware ) {
|
||||
return 0;
|
||||
int recv_addr_size = sizeof(*dest);
|
||||
int result =
|
||||
recvfrom (ip -> rfdesc, (char *)packet_data, packet_len, 0,
|
||||
(struct sockaddr *)dest, &recv_addr_size );
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue