Changes in uspace/lib/net/tl/icmp_remote.c [6b82009:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/tl/icmp_remote.c
r6b82009 r79ae36dd 39 39 #include <net/modules.h> 40 40 #include <packet_client.h> 41 42 #include <async.h> 43 #include <async_obsolete.h> 44 #include <errno.h> 41 45 #include <ipc/services.h> 42 46 #include <ipc/icmp.h> 43 47 #include <sys/types.h> 44 #include <async.h>45 #include <errno.h>46 48 47 /** Send the Destination Unreachable error notification packet.49 /** Sends the Destination Unreachable error notification packet. 48 50 * 49 51 * Beginning of the packet is sent as the notification packet data. … … 51 53 * packet. 52 54 * 53 * @param[in] sess ICMP module session. 54 * @param[in] code Error specific code. 55 * @param[in] mtu Error MTU value. 56 * @param[in] packet Original packet. 57 * 58 * @return EOK on success. 59 * @return EPERM if the ICMP error notifications are disabled. 60 * @return ENOMEM if there is not enough memory left. 61 * 55 * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls. 56 * @param[in] code The error specific code. 57 * @param[in] mtu The error MTU value. 58 * @param[in] packet The original packet. 59 * @return EOK on success. 60 * @return EPERM if the ICMP error notifications are disabled. 61 * @return ENOMEM if there is not enough memory left. 62 62 */ 63 int icmp_destination_unreachable_msg(async_sess_t *sess, icmp_code_t code, 63 int 64 icmp_destination_unreachable_msg(int icmp_phone, icmp_code_t code, 64 65 icmp_param_t mtu, packet_t *packet) 65 66 { 66 async_exch_t *exch = async_exchange_begin(sess); 67 async_msg_3(exch, NET_ICMP_DEST_UNREACH, (sysarg_t) code, 67 async_obsolete_msg_3(icmp_phone, NET_ICMP_DEST_UNREACH, (sysarg_t) code, 68 68 (sysarg_t) packet_get_id(packet), (sysarg_t) mtu); 69 async_exchange_end(exch);70 71 69 return EOK; 72 70 } 73 71 74 /** Send the Source Quench error notification packet.72 /** Sends the Source Quench error notification packet. 75 73 * 76 74 * Beginning of the packet is sent as the notification packet data. … … 78 76 * packet. 79 77 * 80 * @param[in] sess ICMP module session. 81 * @param[in] packet Original packet. 82 * 83 * @return EOK on success. 84 * @return EPERM if the ICMP error notifications are disabled. 85 * @return ENOMEM if there is not enough memory left. 86 * 78 * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls. 79 * @param[in] packet The original packet. 80 * @return EOK on success. 81 * @return EPERM if the ICMP error notifications are disabled. 82 * @return ENOMEM if there is not enough memory left. 87 83 */ 88 int icmp_source_quench_msg( async_sess_t *sess, packet_t *packet)84 int icmp_source_quench_msg(int icmp_phone, packet_t *packet) 89 85 { 90 async_exch_t *exch = async_exchange_begin(sess); 91 async_msg_2(exch, NET_ICMP_SOURCE_QUENCH, 0, 86 async_obsolete_msg_2(icmp_phone, NET_ICMP_SOURCE_QUENCH, 0, 92 87 (sysarg_t) packet_get_id(packet)); 93 async_exchange_end(exch);94 95 88 return EOK; 96 89 } 97 90 98 /** Send the Time Exceeded error notification packet.91 /** Sends the Time Exceeded error notification packet. 99 92 * 100 93 * Beginning of the packet is sent as the notification packet data. … … 102 95 * packet. 103 96 * 104 * @param[in] sess ICMP module session. 105 * @param[in] code Error specific code. 106 * @param[in] packet Original packet. 107 * 108 * @return EOK on success. 109 * @return EPERM if the ICMP error notifications are disabled. 110 * @return ENOMEM if there is not enough memory left. 111 * 97 * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls. 98 * @param[in] code The error specific code. 99 * @param[in] packet The original packet. 100 * @return EOK on success. 101 * @return EPERM if the ICMP error notifications are disabled. 102 * @return ENOMEM if there is not enough memory left. 112 103 */ 113 int icmp_time_exceeded_msg(async_sess_t *sess, icmp_code_t code, 114 packet_t *packet) 104 int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t *packet) 115 105 { 116 async_exch_t *exch = async_exchange_begin(sess); 117 async_msg_2(exch, NET_ICMP_TIME_EXCEEDED, (sysarg_t) code, 106 async_obsolete_msg_2(icmp_phone, NET_ICMP_TIME_EXCEEDED, (sysarg_t) code, 118 107 (sysarg_t) packet_get_id(packet)); 119 async_exchange_end(exch);120 121 108 return EOK; 122 109 } 123 110 124 /** Send the Parameter Problem error notification packet.111 /** Sends the Parameter Problem error notification packet. 125 112 * 126 113 * Beginning of the packet is sent as the notification packet data. … … 128 115 * packet. 129 116 * 130 * @param[in] sess ICMP module session. 131 * @param[in] code Error specific code. 132 * @param[in] pointer Problematic parameter offset. 133 * @param[in] packet Original packet. 134 * 135 * @return EOK on success. 136 * @return EPERM if the ICMP error notifications are disabled. 137 * @return ENOMEM if there is not enough memory left. 138 * 117 * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls. 118 * @param[in] code The error specific code. 119 * @param[in] pointer The problematic parameter offset. 120 * @param[in] packet The original packet. 121 * @return EOK on success. 122 * @return EPERM if the ICMP error notifications are disabled. 123 * @return ENOMEM if there is not enough memory left. 139 124 */ 140 int icmp_parameter_problem_msg( async_sess_t *sess, icmp_code_t code,125 int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code, 141 126 icmp_param_t pointer, packet_t *packet) 142 127 { 143 async_exch_t *exch = async_exchange_begin(sess); 144 async_msg_3(exch, NET_ICMP_PARAMETERPROB, (sysarg_t) code, 128 async_obsolete_msg_3(icmp_phone, NET_ICMP_PARAMETERPROB, (sysarg_t) code, 145 129 (sysarg_t) packet_get_id(packet), (sysarg_t) pointer); 146 async_exchange_end(exch);147 148 130 return EOK; 149 131 } … … 151 133 /** @} 152 134 */ 135
Note:
See TracChangeset
for help on using the changeset viewer.