Changeset eb522e8 in mainline for uspace/lib/net/include/packet_client.h
- Timestamp:
- 2011-06-01T08:43:42Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d6c1f1
- Parents:
- 9e2e715 (diff), e51a514 (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 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/include/packet_client.h
r9e2e715 reb522e8 61 61 * @param[in] type The type to be allocated at the beginning of the packet 62 62 * content. 63 * @return sThe typed pointer to the allocated memory.64 * @return sNULL if the packet is not valid.65 * @return sNULL if there is not enough memory left.63 * @return The typed pointer to the allocated memory. 64 * @return NULL if the packet is not valid. 65 * @return NULL if there is not enough memory left. 66 66 */ 67 67 #define PACKET_PREFIX(packet, type) \ … … 76 76 * @param[in] type The type to be allocated at the end of the packet 77 77 * content. 78 * @return sThe typed pointer to the allocated memory.79 * @return sNULL if the packet is not valid.80 * @return sNULL if there is not enough memory left.78 * @return The typed pointer to the allocated memory. 79 * @return NULL if the packet is not valid. 80 * @return NULL if there is not enough memory left. 81 81 */ 82 82 #define PACKET_SUFFIX(packet, type) \ … … 92 92 * @param[in] suffix The type of the suffix to be removed from the end of 93 93 * the packet content. 94 * @return sEOK on success.95 * @return sEINVAL if the packet is not valid.96 * @return sENOMEM if there is not enough memory left.94 * @return EOK on success. 95 * @return EINVAL if the packet is not valid. 96 * @return ENOMEM if there is not enough memory left. 97 97 */ 98 98 #define PACKET_TRIM(packet, prefix, suffix) \ 99 99 packet_trim((packet), sizeof(prefix), sizeof(suffix)) 100 100 101 extern void *packet_prefix(packet_t , size_t);102 extern void *packet_suffix(packet_t , size_t);103 extern int packet_trim(packet_t , size_t, size_t);104 extern int packet_copy_data(packet_t , const void *, size_t);105 extern packet_id_t packet_get_id(const packet_t );106 extern size_t packet_get_data_length(const packet_t );107 extern void *packet_get_data(const packet_t );108 extern int packet_get_addr(const packet_t , uint8_t **, uint8_t **);109 extern int packet_set_addr(packet_t , const uint8_t *, const uint8_t *, size_t);110 extern packet_t packet_get_copy(int phone, packet_t packet);101 extern void *packet_prefix(packet_t *, size_t); 102 extern void *packet_suffix(packet_t *, size_t); 103 extern int packet_trim(packet_t *, size_t, size_t); 104 extern int packet_copy_data(packet_t *, const void *, size_t); 105 extern packet_id_t packet_get_id(const packet_t *); 106 extern size_t packet_get_data_length(const packet_t *); 107 extern void *packet_get_data(const packet_t *); 108 extern int packet_get_addr(const packet_t *, uint8_t **, uint8_t **); 109 extern int packet_set_addr(packet_t *, const uint8_t *, const uint8_t *, size_t); 110 extern packet_t *packet_get_copy(int, packet_t *); 111 111 112 112 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.