Changeset ceba4bed in mainline for uspace/lib/c


Ignore:
Timestamp:
2012-02-06T17:38:50Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e767dbf
Parents:
bc38578
Message:

Introduce address object. Sketch sending outgoing datagrams to directly
reachable destinations.

Location:
uspace/lib/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/iplink.c

    rbc38578 rceba4bed  
    8888
    8989        ipc_call_t answer;
    90         aid_t req = async_send_2(exch, IPLINK_SEND, sdu->src.ipv4,
    91             sdu->dest.ipv4, &answer);
     90        aid_t req = async_send_2(exch, IPLINK_SEND, sdu->lsrc.ipv4,
     91            sdu->ldest.ipv4, &answer);
    9292        int rc = async_data_write_start(exch, sdu->data, sdu->size);
    9393        async_exchange_end(exch);
     
    127127        iplink_sdu_t sdu;
    128128
    129         sdu.src.ipv4 = IPC_GET_ARG1(*call);
    130         sdu.dest.ipv4 = IPC_GET_ARG2(*call);
     129        sdu.lsrc.ipv4 = IPC_GET_ARG1(*call);
     130        sdu.ldest.ipv4 = IPC_GET_ARG2(*call);
    131131
    132132        rc = async_data_write_accept(&sdu.data, false, 0, 0, 0, &sdu.size);
  • uspace/lib/c/generic/iplink_srv.c

    rbc38578 rceba4bed  
    5757        int rc;
    5858
    59         sdu.src.ipv4 = IPC_GET_ARG1(*call);
    60         sdu.dest.ipv4 = IPC_GET_ARG2(*call);
     59        sdu.lsrc.ipv4 = IPC_GET_ARG1(*call);
     60        sdu.ldest.ipv4 = IPC_GET_ARG2(*call);
    6161
    6262        rc = async_data_write_accept(&sdu.data, false, 0, 0, 0, &sdu.size);
     
    122122
    123123        ipc_call_t answer;
    124         aid_t req = async_send_2(exch, IPLINK_EV_RECV, sdu->src.ipv4,
    125             sdu->dest.ipv4, &answer);
     124        aid_t req = async_send_2(exch, IPLINK_EV_RECV, sdu->lsrc.ipv4,
     125            sdu->ldest.ipv4, &answer);
    126126        int rc = async_data_write_start(exch, sdu->data, sdu->size);
    127127        async_exchange_end(exch);
  • uspace/lib/c/include/inet/iplink.h

    rbc38578 rceba4bed  
    5252/** IP link Service Data Unit */
    5353typedef struct {
    54         /** Source address */
    55         iplink_addr_t src;
    56         /** Destination address */
    57         iplink_addr_t dest;
     54        /** Local source address */
     55        iplink_addr_t lsrc;
     56        /** Local destination address */
     57        iplink_addr_t ldest;
    5858        /** Serialized IP packet */
    5959        void *data;
  • uspace/lib/c/include/inet/iplink_srv.h

    rbc38578 rceba4bed  
    5757/** IP link Service Data Unit */
    5858typedef struct {
    59         /** Source address */
    60         iplink_srv_addr_t src;
    61         /** Destination address */
    62         iplink_srv_addr_t dest;
     59        /** Local source address */
     60        iplink_srv_addr_t lsrc;
     61        /** Local destination address */
     62        iplink_srv_addr_t ldest;
    6363        /** Serialized IP packet */
    6464        void *data;
Note: See TracChangeset for help on using the changeset viewer.