Changeset 1ffa73b in mainline for uspace/srv/net/tl


Ignore:
Timestamp:
2011-01-10T16:33:08Z (15 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b207803
Parents:
863d45e (diff), 6610565b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge development/ changes

Location:
uspace/srv/net/tl
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/icmp/icmp.c

    r863d45e r1ffa73b  
    405405        measured_string_t names[] = {
    406406                {
    407                         (char *) "ICMP_ERROR_REPORTING",
     407                        (uint8_t *) "ICMP_ERROR_REPORTING",
    408408                        20
    409409                },
    410410                {
    411                         (char *) "ICMP_ECHO_REPLYING",
     411                        (uint8_t *) "ICMP_ECHO_REPLYING",
    412412                        18
    413413                }
     
    415415        measured_string_t *configuration;
    416416        size_t count = sizeof(names) / sizeof(measured_string_t);
    417         char *data;
     417        uint8_t *data;
    418418        int rc;
    419419
     
    696696        case NET_ICMP_DEST_UNREACH:
    697697                rc = packet_translate_remote(icmp_globals.net_phone, &packet,
    698                     IPC_GET_PACKET(call));
     698                    IPC_GET_PACKET(*call));
    699699                if (rc != EOK)
    700700                        return rc;
    701701                return icmp_destination_unreachable_msg_local(0,
    702                     ICMP_GET_CODE(call), ICMP_GET_MTU(call), packet);
     702                    ICMP_GET_CODE(*call), ICMP_GET_MTU(*call), packet);
    703703        case NET_ICMP_SOURCE_QUENCH:
    704704                rc = packet_translate_remote(icmp_globals.net_phone, &packet,
    705                     IPC_GET_PACKET(call));
     705                    IPC_GET_PACKET(*call));
    706706                if (rc != EOK)
    707707                        return rc;
     
    709709        case NET_ICMP_TIME_EXCEEDED:
    710710                rc = packet_translate_remote(icmp_globals.net_phone, &packet,
    711                     IPC_GET_PACKET(call));
     711                    IPC_GET_PACKET(*call));
    712712                if (rc != EOK)
    713713                        return rc;
    714                 return icmp_time_exceeded_msg_local(0, ICMP_GET_CODE(call),
     714                return icmp_time_exceeded_msg_local(0, ICMP_GET_CODE(*call),
    715715                    packet);
    716716        case NET_ICMP_PARAMETERPROB:
    717717                rc = packet_translate_remote(icmp_globals.net_phone, &packet,
    718                     IPC_GET_PACKET(call));
     718                    IPC_GET_PACKET(*call));
    719719                if (rc != EOK)
    720720                        return rc;
    721                 return icmp_parameter_problem_msg_local(0, ICMP_GET_CODE(call),
    722                     ICMP_GET_POINTER(call), packet);
     721                return icmp_parameter_problem_msg_local(0, ICMP_GET_CODE(*call),
     722                    ICMP_GET_POINTER(*call), packet);
    723723        default:
    724724                return ENOTSUP;
     
    787787        bool keep_on_going = true;
    788788        ipc_call_t answer;
    789         int answer_count;
     789        size_t answer_count;
    790790        size_t length;
    791791        struct sockaddr *addr;
     
    894894 */
    895895int icmp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
    896     ipc_call_t *answer, int *answer_count)
     896    ipc_call_t *answer, size_t *answer_count)
    897897{
    898898        packet_t *packet;
     
    903903        case NET_TL_RECEIVED:
    904904                rc = packet_translate_remote(icmp_globals.net_phone, &packet,
    905                     IPC_GET_PACKET(call));
     905                    IPC_GET_PACKET(*call));
    906906                if (rc != EOK)
    907907                        return rc;
    908                 return icmp_received_msg_local(IPC_GET_DEVICE(call), packet,
    909                     SERVICE_ICMP, IPC_GET_ERROR(call));
     908                return icmp_received_msg_local(IPC_GET_DEVICE(*call), packet,
     909                    SERVICE_ICMP, IPC_GET_ERROR(*call));
    910910       
    911911        case NET_ICMP_INIT:
    912                 return icmp_process_client_messages(callid, * call);
     912                return icmp_process_client_messages(callid, *call);
    913913       
    914914        default:
     
    936936        while (true) {
    937937                ipc_call_t answer;
    938                 int answer_count;
     938                size_t answer_count;
    939939               
    940940                /* Clear the answer structure */
  • uspace/srv/net/tl/icmp/icmp_module.c

    r863d45e r1ffa73b  
    8686
    8787int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
    88     ipc_call_t *answer, int *answer_count)
     88    ipc_call_t *answer, size_t *count)
    8989{
    90         return icmp_message_standalone(callid, call, answer, answer_count);
     90        return icmp_message_standalone(callid, call, answer, count);
    9191}
    9292
  • uspace/srv/net/tl/icmp/icmp_module.h

    r863d45e r1ffa73b  
    4444extern int icmp_initialize(async_client_conn_t);
    4545extern int icmp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
    46     int *);
     46    size_t *);
    4747
    4848#endif
  • uspace/srv/net/tl/tcp/tcp.c

    r863d45e r1ffa73b  
    154154
    155155        /** Port map key. */
    156         char *key;
     156        uint8_t *key;
    157157
    158158        /** Port map key length. */
     
    358358        /* Find the destination socket */
    359359        socket = socket_port_find(&tcp_globals.sockets,
    360             ntohs(header->destination_port), (const char *) src, addrlen);
     360            ntohs(header->destination_port), (uint8_t *) src, addrlen);
    361361        if (!socket) {
    362362                /* Find the listening destination socket */
    363363                socket = socket_port_find(&tcp_globals.sockets,
    364                     ntohs(header->destination_port), SOCKET_MAP_KEY_LISTENING,
    365                     0);
     364                    ntohs(header->destination_port),
     365                    (uint8_t *) SOCKET_MAP_KEY_LISTENING, 0);
    366366        }
    367367
     
    998998        /* Find the destination socket */
    999999        listening_socket = socket_port_find(&tcp_globals.sockets,
    1000             listening_port, SOCKET_MAP_KEY_LISTENING, 0);
     1000            listening_port, (uint8_t *) SOCKET_MAP_KEY_LISTENING, 0);
    10011001        if (!listening_socket ||
    10021002            (listening_socket->socket_id != listening_socket_id)) {
     
    10221022
    10231023        rc = socket_port_add(&tcp_globals.sockets, listening_port, socket,
    1024             (const char *) socket_data->addr, socket_data->addrlen);
     1024            (uint8_t *) socket_data->addr, socket_data->addrlen);
    10251025        assert(socket == socket_port_find(&tcp_globals.sockets, listening_port,
    1026             (const char *) socket_data->addr, socket_data->addrlen));
     1026            (uint8_t *) socket_data->addr, socket_data->addrlen));
    10271027
    10281028//      rc = socket_bind_free_port(&tcp_globals.sockets, socket,
     
    12621262int
    12631263tcp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
    1264     ipc_call_t *answer, int *answer_count)
     1264    ipc_call_t *answer, size_t *answer_count)
    12651265{
    12661266        packet_t *packet;
     
    12761276//              fibril_rwlock_read_lock(&tcp_globals.lock);
    12771277                rc = packet_translate_remote(tcp_globals.net_phone, &packet,
    1278                     IPC_GET_PACKET(call));
     1278                    IPC_GET_PACKET(*call));
    12791279                if (rc != EOK) {
    12801280//                      fibril_rwlock_read_unlock(&tcp_globals.lock);
    12811281                        return rc;
    12821282                }
    1283                 rc = tcp_received_msg(IPC_GET_DEVICE(call), packet, SERVICE_TCP,
    1284                     IPC_GET_ERROR(call));
     1283                rc = tcp_received_msg(IPC_GET_DEVICE(*call), packet, SERVICE_TCP,
     1284                    IPC_GET_ERROR(*call));
    12851285//              fibril_rwlock_read_unlock(&tcp_globals.lock);
    12861286                return rc;
     
    13231323        bool keep_on_going = true;
    13241324        socket_cores_t local_sockets;
    1325         int app_phone = IPC_GET_PHONE(&call);
     1325        int app_phone = IPC_GET_PHONE(call);
    13261326        struct sockaddr *addr;
    13271327        int socket_id;
     
    13301330        fibril_rwlock_t lock;
    13311331        ipc_call_t answer;
    1332         int answer_count;
     1332        size_t answer_count;
    13331333        tcp_socket_data_t *socket_data;
    13341334        socket_core_t *socket;
     
    21092109
    21102110        /* Copy the key */
    2111         operation_timeout->key = ((char *) operation_timeout) +
     2111        operation_timeout->key = ((uint8_t *) operation_timeout) +
    21122112            sizeof(*operation_timeout);
    21132113        operation_timeout->key_length = socket->key_length;
     
    25022502        while (true) {
    25032503                ipc_call_t answer;
    2504                 int answer_count;
     2504                size_t answer_count;
    25052505
    25062506                /* Clear the answer structure */
  • uspace/srv/net/tl/tcp/tcp_module.c

    r863d45e r1ffa73b  
    8787
    8888int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
    89     ipc_call_t *answer, int *answer_count)
     89    ipc_call_t *answer, size_t *count)
    9090{
    91         return tcp_message_standalone(callid, call, answer, answer_count);
     91        return tcp_message_standalone(callid, call, answer, count);
    9292}
    9393
  • uspace/srv/net/tl/tcp/tcp_module.h

    r863d45e r1ffa73b  
    4444extern int tcp_initialize(async_client_conn_t);
    4545extern int tcp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
    46     int *);
     46    size_t *);
    4747
    4848#endif
  • uspace/srv/net/tl/udp/udp.c

    r863d45e r1ffa73b  
    104104        measured_string_t names[] = {
    105105                {
    106                         (char *) "UDP_CHECKSUM_COMPUTING",
     106                        (uint8_t *) "UDP_CHECKSUM_COMPUTING",
    107107                        22
    108108                },
    109109                {
    110                         (char *) "UDP_AUTOBINDING",
     110                        (uint8_t *) "UDP_AUTOBINDING",
    111111                        15
    112112                }
     
    114114        measured_string_t *configuration;
    115115        size_t count = sizeof(names) / sizeof(measured_string_t);
    116         char *data;
     116        uint8_t *data;
    117117        int rc;
    118118
     
    283283        /* Find the destination socket */
    284284        socket = socket_port_find(&udp_globals.sockets,
    285         ntohs(header->destination_port), SOCKET_MAP_KEY_LISTENING, 0);
     285            ntohs(header->destination_port), (uint8_t *) SOCKET_MAP_KEY_LISTENING, 0);
    286286        if (!socket) {
    287287                if (tl_prepare_icmp_packet(udp_globals.net_phone,
     
    707707        bool keep_on_going = true;
    708708        socket_cores_t local_sockets;
    709         int app_phone = IPC_GET_PHONE(&call);
     709        int app_phone = IPC_GET_PHONE(call);
    710710        struct sockaddr *addr;
    711711        int socket_id;
     
    713713        size_t size = 0;
    714714        ipc_call_t answer;
    715         int answer_count;
     715        size_t answer_count;
    716716        packet_dimension_t *packet_dimension;
    717717
     
    861861 */
    862862int udp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
    863     ipc_call_t *answer, int *answer_count)
     863    ipc_call_t *answer, size_t *answer_count)
    864864{
    865865        packet_t *packet;
     
    871871        case NET_TL_RECEIVED:
    872872                rc = packet_translate_remote(udp_globals.net_phone, &packet,
    873                     IPC_GET_PACKET(call));
     873                    IPC_GET_PACKET(*call));
    874874                if (rc != EOK)
    875875                        return rc;
    876                 return udp_received_msg(IPC_GET_DEVICE(call), packet,
    877                     SERVICE_UDP, IPC_GET_ERROR(call));
     876                return udp_received_msg(IPC_GET_DEVICE(*call), packet,
     877                    SERVICE_UDP, IPC_GET_ERROR(*call));
    878878        case IPC_M_CONNECT_TO_ME:
    879                 return udp_process_client_messages(callid, * call);
     879                return udp_process_client_messages(callid, *call);
    880880        }
    881881
     
    898898        while (true) {
    899899                ipc_call_t answer;
    900                 int answer_count;
     900                size_t answer_count;
    901901               
    902902                /* Clear the answer structure */
  • uspace/srv/net/tl/udp/udp_module.c

    r863d45e r1ffa73b  
    8787
    8888int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
    89     ipc_call_t *answer, int *answer_count)
     89    ipc_call_t *answer, size_t *count)
    9090{
    91         return udp_message_standalone(callid, call, answer, answer_count);
     91        return udp_message_standalone(callid, call, answer, count);
    9292}
    9393
  • uspace/srv/net/tl/udp/udp_module.h

    r863d45e r1ffa73b  
    4444extern int udp_initialize(async_client_conn_t);
    4545extern int udp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
    46     int *);
     46    size_t *);
    4747
    4848#endif
Note: See TracChangeset for help on using the changeset viewer.