Changeset a358279 in mainline for uspace/lib/socket/include/net_messages.h
- Timestamp:
- 2010-10-14T19:55:56Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 514ee46
- Parents:
- e526f08
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/socket/include/net_messages.h
re526f08 ra358279 45 45 #include <adt/measured_strings.h> 46 46 #include <net/packet.h> 47 48 /** @name Networking specific message arguments definitions49 */50 /*@{*/51 52 /** @name First arguments53 */54 /*@{*/55 56 /** Returns the device identifier message argument.57 * @param[in] call The message call structure.58 */59 #define IPC_GET_DEVICE(call) \60 ({device_id_t device_id = (device_id_t) IPC_GET_ARG1(*call); device_id;})61 62 /*@;})*/63 64 /** @name Second arguments65 */66 /*@({*/67 68 /** Returns the packet identifier message argument.69 * @param[in] call The message call structure.70 */71 #define IPC_GET_PACKET(call) \72 ({packet_id_t packet_id = (packet_id_t) IPC_GET_ARG2(*call); packet_id;})73 74 /** Returns the count message argument.75 * @param[in] call The message call structure.76 */77 #define IPC_GET_COUNT(call) \78 ({size_t size = (size_t) IPC_GET_ARG2(*call); size;})79 80 /** Returns the device state message argument.81 * @param[in] call The message call structure.82 */83 #define IPC_GET_STATE(call) \84 ({device_state_t device_state = (device_state_t) IPC_GET_ARG2(*call); device_state;})85 86 /** Returns the maximum transmission unit message argument.87 * @param[in] call The message call structure.88 */89 #define IPC_GET_MTU(call) \90 ({size_t size = (size_t) IPC_GET_ARG2(*call); size;})91 92 /*@;})*/93 94 /** @name Third arguments95 */96 /*@({*/97 98 /** Returns the device driver service message argument.99 * @param[in] call The message call structure.100 */101 #define IPC_GET_SERVICE(call) \102 ({services_t service = (services_t) IPC_GET_ARG3(*call); service;})103 104 /** Returns the target service message argument.105 * @param[in] call The message call structure.106 */107 #define IPC_GET_TARGET(call) \108 ({services_t service = (services_t) IPC_GET_ARG3(*call); service;})109 110 /** Returns the sender service message argument.111 * @param[in] call The message call structure.112 */113 #define IPC_GET_SENDER(call) \114 ({services_t service = (services_t) IPC_GET_ARG3(*call); service;})115 116 /*@;})*/117 118 /** @name Fourth arguments119 */120 /*@({*/121 122 /** Returns the error service message argument.123 * @param[in] call The message call structure.124 */125 #define IPC_GET_ERROR(call) \126 ({services_t service = (services_t) IPC_GET_ARG4(*call); service;})127 128 /*@;})*/129 130 /** @name Fifth arguments131 */132 /*@({*/133 134 /** Returns the phone message argument.135 * @param[in] call The message call structure.136 */137 #define IPC_GET_PHONE(call) \138 ({int phone = (int) IPC_GET_ARG5(*call); phone;})139 140 /*@}*/141 142 /** @name First answers143 */144 /*@{*/145 146 /** Sets the device identifier in the message answer.147 * @param[out] answer The message answer structure.148 */149 #define IPC_SET_DEVICE(answer, value) \150 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(*answer, argument);}151 152 /** Sets the minimum address length in the message answer.153 * @param[out] answer The message answer structure.154 */155 #define IPC_SET_ADDR(answer, value) \156 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(*answer, argument);}157 158 /*@}*/159 160 /** @name Second answers161 */162 /*@{*/163 164 /** Sets the minimum prefix size in the message answer.165 * @param[out] answer The message answer structure.166 */167 #define IPC_SET_PREFIX(answer, value) \168 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(*answer, argument);}169 170 /*@}*/171 172 /** @name Third answers173 */174 /*@{*/175 176 /** Sets the maximum content size in the message answer.177 * @param[out] answer The message answer structure.178 */179 #define IPC_SET_CONTENT(answer, value) \180 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(*answer, argument);}181 182 /*@}*/183 184 /** @name Fourth answers185 */186 /*@{*/187 188 /** Sets the minimum suffix size in the message answer.189 * @param[out] answer The message answer structure.190 */191 #define IPC_SET_SUFFIX(answer, value) \192 {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG4(*answer, argument);}193 194 /*@}*/195 196 /*@}*/197 47 198 48 /** Notify the module about the device state change.
Note:
See TracChangeset
for help on using the changeset viewer.