Changeset c5bff3c in mainline for uspace/srv/net/inet/addrobj.h
- Timestamp:
- 2012-04-28T16:22:15Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8013637
- Parents:
- 81716eb (diff), 76983ff (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inet/addrobj.h
r81716eb rc5bff3c 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2012 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libnet29 /** @addtogroup inet 30 30 * @{ 31 31 */ 32 33 /** @file 34 * Ethernet protocol numbers according to the on-line IANA - Ethernet numbers 35 * http://www.iana.org/assignments/ethernet-numbers 36 * cited January 17 2009. 32 /** 33 * @file 34 * @brief 37 35 */ 38 36 39 #ifndef LIBNET_ETHERNET_PROTOCOLS_H_40 #define LIBNET_ETHERNET_PROTOCOLS_H_37 #ifndef INET_ADDROBJ_H_ 38 #define INET_ADDROBJ_H_ 41 39 42 40 #include <sys/types.h> 41 #include "inet.h" 43 42 44 /** Ethernet protocol type definition. */ 45 typedef uint16_t eth_type_t; 43 typedef enum { 44 /* Find matching network address (using mask) */ 45 iaf_net, 46 /* Find exact local address (not using mask) */ 47 iaf_addr 48 } inet_addrobj_find_t; 46 49 47 /** @name Ethernet protocols definitions */ 48 /*@{*/ 50 extern inet_addrobj_t *inet_addrobj_new(void); 51 extern void inet_addrobj_delete(inet_addrobj_t *); 52 extern void inet_addrobj_add(inet_addrobj_t *); 53 extern void inet_addrobj_remove(inet_addrobj_t *); 54 extern inet_addrobj_t *inet_addrobj_find(inet_addr_t *, inet_addrobj_find_t); 55 extern inet_addrobj_t *inet_addrobj_find_by_name(const char *, inet_link_t *); 56 extern inet_addrobj_t *inet_addrobj_get_by_id(sysarg_t); 57 extern int inet_addrobj_send_dgram(inet_addrobj_t *, inet_addr_t *, 58 inet_dgram_t *, uint8_t, uint8_t, int); 59 extern int inet_addrobj_get_id_list(sysarg_t **, size_t *); 49 60 50 /** Ethernet minimal protocol number.51 * According to the IEEE 802.3 specification.52 */53 #define ETH_MIN_PROTO 0x0600 /* 1536 */54 55 /** Internet IP (IPv4) ethernet protocol type. */56 #define ETH_P_IP 0x080057 58 /** ARP ethernet protocol type. */59 #define ETH_P_ARP 0x080660 61 /*@}*/62 61 63 62 #endif
Note:
See TracChangeset
for help on using the changeset viewer.