Changes in uspace/lib/c/include/ipc/net.h [a358279:2aa15d4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/net.h
ra358279 r2aa15d4 41 41 #include <ipc/services.h> 42 42 43 #include <net/device.h>44 #include <net/packet.h>45 46 43 /** Returns a value indicating whether the value is in the interval. 47 44 * @param[in] item The value to be checked. … … 178 175 #define NET_PACKET_FIRST (NET_SOCKET_LAST + 0) 179 176 180 /** The last packet management system message. */ 177 /** The last packet management system message. 178 */ 181 179 #define NET_PACKET_LAST (NET_PACKET_FIRST + NET_PACKET_COUNT) 182 180 … … 188 186 189 187 /** Returns a value indicating whether the IPC call is a generic networking 190 * message.188 * message. 191 189 * @param[in] call The IPC call to be checked. 192 190 */ … … 272 270 /*@}*/ 273 271 274 /** @name Networking specific message arguments definitions */275 /*@{*/276 277 /** Returns the device identifier message argument.278 * @param[in] call The message call structure.279 */280 #define IPC_GET_DEVICE(call) \281 ({ \282 device_id_t device_id = (device_id_t) IPC_GET_ARG1(*call); \283 device_id; \284 })285 286 /** Returns the packet identifier message argument.287 * @param[in] call The message call structure.288 */289 #define IPC_GET_PACKET(call) \290 ({ \291 packet_id_t packet_id = (packet_id_t) IPC_GET_ARG2(*call); \292 packet_id; \293 })294 295 /** Returns the count message argument.296 * @param[in] call The message call structure.297 */298 #define IPC_GET_COUNT(call) \299 ({ \300 size_t size = (size_t) IPC_GET_ARG2(*call); \301 size; \302 })303 304 /** Returns the device state message argument.305 * @param[in] call The message call structure.306 */307 #define IPC_GET_STATE(call) \308 ({ \309 device_state_t state = (device_state_t) IPC_GET_ARG2(*call); \310 state; \311 })312 313 /** Returns the maximum transmission unit message argument.314 * @param[in] call The message call structure.315 */316 #define IPC_GET_MTU(call) \317 ({ \318 size_t size = (size_t) IPC_GET_ARG2(*call); \319 size; \320 })321 322 /** Returns the device driver service message argument.323 * @param[in] call The message call structure.324 */325 #define IPC_GET_SERVICE(call) \326 ({ \327 services_t service = (services_t) IPC_GET_ARG3(*call); \328 service; \329 })330 331 /** Returns the target service message argument.332 * @param[in] call The message call structure.333 */334 #define IPC_GET_TARGET(call) \335 ({ \336 services_t service = (services_t) IPC_GET_ARG3(*call); \337 service; \338 })339 340 /** Returns the sender service message argument.341 * @param[in] call The message call structure.342 */343 #define IPC_GET_SENDER(call) \344 ({ \345 services_t service = (services_t) IPC_GET_ARG3(*call); \346 service; \347 })348 349 /** Returns the error service message argument.350 * @param[in] call The message call structure.351 */352 #define IPC_GET_ERROR(call) \353 ({ \354 services_t service = (services_t) IPC_GET_ARG4(*call); \355 service; \356 })357 358 /** Returns the phone message argument.359 * @param[in] call The message call structure.360 */361 #define IPC_GET_PHONE(call) \362 ({ \363 int phone = (int) IPC_GET_ARG5(*call); \364 phone; \365 })366 367 /** Sets the device identifier in the message answer.368 * @param[out] answer The message answer structure.369 */370 #define IPC_SET_DEVICE(answer, value) \371 do { \372 ipcarg_t argument = (ipcarg_t) (value); \373 IPC_SET_ARG1(*answer, argument); \374 } while (0)375 376 /** Sets the minimum address length in the message answer.377 * @param[out] answer The message answer structure.378 */379 #define IPC_SET_ADDR(answer, value) \380 do { \381 ipcarg_t argument = (ipcarg_t) (value); \382 IPC_SET_ARG1(*answer, argument); \383 } while (0)384 385 /** Sets the minimum prefix size in the message answer.386 * @param[out] answer The message answer structure.387 */388 #define IPC_SET_PREFIX(answer, value) \389 do { \390 ipcarg_t argument = (ipcarg_t) (value); \391 IPC_SET_ARG2(*answer, argument); \392 } while (0)393 394 /** Sets the maximum content size in the message answer.395 * @param[out] answer The message answer structure.396 */397 #define IPC_SET_CONTENT(answer, value) \398 do { \399 ipcarg_t argument = (ipcarg_t) (value); \400 IPC_SET_ARG3(*answer, argument); \401 } while (0)402 403 /** Sets the minimum suffix size in the message answer.404 * @param[out] answer The message answer structure.405 */406 #define IPC_SET_SUFFIX(answer, value) \407 do { \408 ipcarg_t argument = (ipcarg_t) (value); \409 IPC_SET_ARG4(*answer, argument); \410 } while (0)411 412 /*@}*/413 414 272 #endif 415 273
Note:
See TracChangeset
for help on using the changeset viewer.