Changeset b4edc96 in mainline for uspace/lib/inet/include
- Timestamp:
- 2021-08-08T09:20:20Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3e6bca8
- Parents:
- d5ed54b
- Location:
- uspace/lib/inet/include
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/inet/include/inet/addr.h
rd5ed54b rb4edc96 37 37 38 38 #include <errno.h> 39 #include <inet/eth_addr.h> 39 40 #include <stdint.h> 40 41 41 42 typedef uint32_t addr32_t; 42 43 #define ETH_ADDR_SIZE 644 45 typedef struct {46 uint8_t b[ETH_ADDR_SIZE];47 } addr48_t;48 43 49 44 typedef uint8_t addr128_t[16]; … … 84 79 85 80 extern const addr32_t addr32_broadcast_all_hosts; 86 extern const addr48_t addr48_broadcast;87 81 88 82 extern void addr128(const addr128_t, addr128_t); 89 83 90 extern int addr48_compare(const addr48_t *, const addr48_t *);91 84 extern int addr128_compare(const addr128_t, const addr128_t); 92 93 extern void addr48_solicited_node(const addr128_t, addr48_t *); 85 extern void eth_addr_solicited_node(const addr128_t, eth_addr_t *); 94 86 95 87 extern void host2addr128_t_be(const addr128_t, addr128_t); -
uspace/lib/inet/include/inet/eth_addr.h
rd5ed54b rb4edc96 38 38 #define _LIBC_INET_ETH_ADDR_H_ 39 39 40 // XXX Move addr48 here 41 #include <inet/addr.h> 40 #include <stdint.h> 42 41 43 extern void mac48_encode(addr48_t *, void *); 44 extern void mac48_decode(const void *, addr48_t *); 42 #define ETH_ADDR_SIZE 6 43 44 typedef struct { 45 uint8_t b[ETH_ADDR_SIZE]; 46 } eth_addr_t; 47 48 extern const eth_addr_t eth_addr_broadcast; 49 50 extern void eth_addr_encode(eth_addr_t *, void *); 51 extern void eth_addr_decode(const void *, eth_addr_t *); 52 53 extern int eth_addr_compare(const eth_addr_t *, const eth_addr_t *); 45 54 46 55 #endif -
uspace/lib/inet/include/inet/iplink.h
rd5ed54b rb4edc96 38 38 #include <async.h> 39 39 #include <inet/addr.h> 40 #include <inet/eth_addr.h> 40 41 41 42 struct iplink_ev_ops; … … 62 63 typedef struct { 63 64 /** Local MAC destination address */ 64 addr48_t dest;65 eth_addr_t dest; 65 66 /** Serialized IP packet */ 66 67 void *data; … … 79 80 typedef struct iplink_ev_ops { 80 81 errno_t (*recv)(iplink_t *, iplink_recv_sdu_t *, ip_ver_t); 81 errno_t (*change_addr)(iplink_t *, addr48_t *);82 errno_t (*change_addr)(iplink_t *, eth_addr_t *); 82 83 } iplink_ev_ops_t; 83 84 … … 89 90 extern errno_t iplink_addr_remove(iplink_t *, inet_addr_t *); 90 91 extern errno_t iplink_get_mtu(iplink_t *, size_t *); 91 extern errno_t iplink_get_mac48(iplink_t *, addr48_t *);92 extern errno_t iplink_set_mac48(iplink_t *, addr48_t *);92 extern errno_t iplink_get_mac48(iplink_t *, eth_addr_t *); 93 extern errno_t iplink_set_mac48(iplink_t *, eth_addr_t *); 93 94 extern void *iplink_get_userptr(iplink_t *); 94 95 -
uspace/lib/inet/include/inet/iplink_srv.h
rd5ed54b rb4edc96 1 1 /* 2 * Copyright (c) 20 12Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 38 38 #include <async.h> 39 39 #include <fibril_synch.h> 40 #include <inet/addr.h> 41 #include <inet/eth_addr.h> 42 #include <inet/iplink.h> 40 43 #include <stdbool.h> 41 #include <inet/addr.h>42 #include <inet/iplink.h>43 44 44 45 struct iplink_ops; … … 58 59 errno_t (*send6)(iplink_srv_t *, iplink_sdu6_t *); 59 60 errno_t (*get_mtu)(iplink_srv_t *, size_t *); 60 errno_t (*get_mac48)(iplink_srv_t *, addr48_t *);61 errno_t (*set_mac48)(iplink_srv_t *, addr48_t *);61 errno_t (*get_mac48)(iplink_srv_t *, eth_addr_t *); 62 errno_t (*set_mac48)(iplink_srv_t *, eth_addr_t *); 62 63 errno_t (*addr_add)(iplink_srv_t *, inet_addr_t *); 63 64 errno_t (*addr_remove)(iplink_srv_t *, inet_addr_t *); … … 68 69 extern errno_t iplink_conn(ipc_call_t *, void *); 69 70 extern errno_t iplink_ev_recv(iplink_srv_t *, iplink_recv_sdu_t *, ip_ver_t); 70 extern errno_t iplink_ev_change_addr(iplink_srv_t *, addr48_t *);71 extern errno_t iplink_ev_change_addr(iplink_srv_t *, eth_addr_t *); 71 72 72 73 #endif -
uspace/lib/inet/include/types/inetcfg.h
rd5ed54b rb4edc96 1 1 /* 2 * Copyright (c) 20 13Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 36 36 #define _LIBC_TYPES_INETCFG_H_ 37 37 38 #include <inet/eth_addr.h> 38 39 #include <inet/inet.h> 39 40 #include <stddef.h> … … 56 57 size_t def_mtu; 57 58 /** Link layer address */ 58 addr48_t mac_addr;59 eth_addr_t mac_addr; 59 60 } inet_link_info_t; 60 61
Note:
See TracChangeset
for help on using the changeset viewer.