Changeset 2f19103 in mainline for uspace/srv/net/udp/ucall.c
- Timestamp:
- 2015-05-22T07:21:37Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 58e9dec
- Parents:
- bf7587b0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/udp/ucall.c
rbf7587b0 r2f19103 1 1 /* 2 * Copyright (c) 201 2Jiri Svoboda2 * Copyright (c) 2015 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 50 50 51 51 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_create()"); 52 nassoc = udp_assoc_new(NULL, NULL, NULL , NULL);52 nassoc = udp_assoc_new(NULL, NULL, NULL); 53 53 if (nassoc == NULL) 54 54 return UDP_ENORES; … … 67 67 } 68 68 69 udp_error_t udp_uc_set_ foreign(udp_assoc_t *assoc, udp_sock_t *fsock)69 udp_error_t udp_uc_set_remote(udp_assoc_t *assoc, inet_ep_t *ep) 70 70 { 71 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_set_ foreign(%p, %p)", assoc, fsock);71 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_set_remote(%p, %p)", assoc, ep); 72 72 73 udp_assoc_set_ foreign(assoc, fsock);73 udp_assoc_set_remote(assoc, ep); 74 74 return UDP_EOK; 75 75 } 76 76 77 udp_error_t udp_uc_set_local(udp_assoc_t *assoc, udp_sock_t *lsock)77 udp_error_t udp_uc_set_local(udp_assoc_t *assoc, inet_ep_t *ep) 78 78 { 79 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_set_local(%p, %p)", assoc, lsock);80 81 udp_assoc_set_local(assoc, lsock);79 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_set_local(%p, %p)", assoc, ep); 80 81 udp_assoc_set_local(assoc, ep); 82 82 return UDP_EOK; 83 83 } … … 86 86 { 87 87 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_uc_set_local(%p, %" PRIu16 ")", assoc, lport); 88 88 89 89 udp_assoc_set_local_port(assoc, lport); 90 90 return UDP_EOK; 91 91 } 92 92 93 udp_error_t udp_uc_send(udp_assoc_t *assoc, udp_sock_t *fsock, void *data,93 udp_error_t udp_uc_send(udp_assoc_t *assoc, inet_ep_t *remote, void *data, 94 94 size_t size, xflags_t flags) 95 95 { … … 102 102 msg.data_size = size; 103 103 104 rc = udp_assoc_send(assoc, fsock, &msg);104 rc = udp_assoc_send(assoc, remote, &msg); 105 105 switch (rc) { 106 106 case ENOMEM: … … 115 115 116 116 udp_error_t udp_uc_receive(udp_assoc_t *assoc, void *buf, size_t size, 117 size_t *rcvd, xflags_t *xflags, udp_sock_t *fsock)117 size_t *rcvd, xflags_t *xflags, inet_ep_t *remote) 118 118 { 119 119 size_t xfer_size; … … 122 122 123 123 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: udp_uc_receive()", assoc->name); 124 rc = udp_assoc_recv(assoc, &msg, fsock);124 rc = udp_assoc_recv(assoc, &msg, remote); 125 125 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_recv -> %d", rc); 126 126 switch (rc) {
Note:
See TracChangeset
for help on using the changeset viewer.