Changes in uspace/lib/packet/generic/packet_server.c [ffa2c8ef:01b87dc5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/packet/generic/packet_server.c
rffa2c8ef r01b87dc5 44 44 #include <unistd.h> 45 45 #include <sys/mman.h> 46 47 #include <ipc/ipc.h> 46 48 #include <ipc/packet.h> 47 49 #include <ipc/net.h> 50 48 51 #include <net/packet.h> 49 52 #include <net/packet_header.h> … … 289 292 290 293 if (!async_share_in_receive(&callid, &size)) { 291 async_answer_0(callid, EINVAL);294 ipc_answer_0(callid, EINVAL); 292 295 return EINVAL; 293 296 } 294 297 295 298 if (size != packet->length) { 296 async_answer_0(callid, ENOMEM);299 ipc_answer_0(callid, ENOMEM); 297 300 return ENOMEM; 298 301 } … … 319 322 int 320 323 packet_server_message(ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer, 321 size_t *answer_count)324 int *answer_count) 322 325 { 323 326 packet_t *packet; … … 330 333 case NET_PACKET_CREATE_1: 331 334 packet = packet_get_local(DEFAULT_ADDR_LEN, DEFAULT_PREFIX, 332 IPC_GET_CONTENT( *call), DEFAULT_SUFFIX);335 IPC_GET_CONTENT(call), DEFAULT_SUFFIX); 333 336 if (!packet) 334 337 return ENOMEM; … … 340 343 case NET_PACKET_CREATE_4: 341 344 packet = packet_get_local( 342 ((DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN( *call)) ?343 IPC_GET_ADDR_LEN( *call) : DEFAULT_ADDR_LEN),344 DEFAULT_PREFIX + IPC_GET_PREFIX( *call),345 IPC_GET_CONTENT( *call),346 DEFAULT_SUFFIX + IPC_GET_SUFFIX( *call));345 ((DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN(call)) ? 346 IPC_GET_ADDR_LEN(call) : DEFAULT_ADDR_LEN), 347 DEFAULT_PREFIX + IPC_GET_PREFIX(call), 348 IPC_GET_CONTENT(call), 349 DEFAULT_SUFFIX + IPC_GET_SUFFIX(call)); 347 350 if (!packet) 348 351 return ENOMEM; … … 353 356 354 357 case NET_PACKET_GET: 355 packet = pm_find(IPC_GET_ID( *call));358 packet = pm_find(IPC_GET_ID(call)); 356 359 if (!packet_is_valid(packet)) 357 360 return ENOENT; … … 359 362 360 363 case NET_PACKET_GET_SIZE: 361 packet = pm_find(IPC_GET_ID( *call));364 packet = pm_find(IPC_GET_ID(call)); 362 365 if (!packet_is_valid(packet)) 363 366 return ENOENT; … … 367 370 368 371 case NET_PACKET_RELEASE: 369 return packet_release_wrapper(IPC_GET_ID( *call));372 return packet_release_wrapper(IPC_GET_ID(call)); 370 373 } 371 374
Note:
See TracChangeset
for help on using the changeset viewer.