Changeset 1b59023 in mainline
- Timestamp:
- 2010-12-16T17:13:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f87c900
- Parents:
- 7837101e
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/net/modules.h
r7837101e r1b59023 49 49 #include <sys/time.h> 50 50 51 /** Converts the data length between different types.52 *53 * @param[in] type_from The source type.54 * @param[in] type_to The destination type.55 * @param[in] count The number units of the source type size.56 */57 #define CONVERT_SIZE(type_from, type_to, count) \58 ((sizeof(type_from) / sizeof(type_to)) * (count))59 60 51 /** Registers the module service at the name server. 61 52 * -
uspace/srv/hw/netif/dp8390/dp8390_module.c
r7837101e r1b59023 197 197 return rc; 198 198 address->value = (char *) (&((dpeth_t *) device->specific)->de_address); 199 address->length = CONVERT_SIZE(ether_addr_t, char, 1);199 address->length = sizeof(ether_addr_t); 200 200 return EOK; 201 201 } -
uspace/srv/net/il/ip/ip.c
r7837101e r1b59023 442 442 if (route) { 443 443 address.value = (char *) &route->address.s_addr; 444 address.length = CONVERT_SIZE(in_addr_t, char, 1);444 address.length = sizeof(in_addr_t); 445 445 446 446 rc = arp_device_req(ip_netif->arp->phone, … … 1005 1005 destination.value = route->gateway.s_addr ? 1006 1006 (char *) &route->gateway.s_addr : (char *) &dest.s_addr; 1007 destination.length = CONVERT_SIZE(dest.s_addr, char, 1);1007 destination.length = sizeof(dest.s_addr); 1008 1008 1009 1009 rc = arp_translate_req(netif->arp->phone, netif->device_id,
Note:
See TracChangeset
for help on using the changeset viewer.