Changeset df3c6f02 in mainline for uspace/lib/net/il/ip_client.c


Ignore:
Timestamp:
2011-05-31T22:58:56Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d362410
Parents:
82582e4 (diff), 4ce90544 (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 mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/il/ip_client.c

    r82582e4 rdf3c6f02  
    123123                return EOK;
    124124
    125         /* TODO IPv6 */
    126 /*      case AF_INET6:
     125        // TODO IPv6
     126#if 0
     127        case AF_INET6:
    127128                if (addrlen != sizeof(struct sockaddr_in6))
    128129                        return EINVAL;
     
    130131                address_in6 = (struct sockaddr_in6 *) addr;
    131132                return EOK;
    132 */
     133#endif
    133134
    134135        default:
     
    180181        /* Set the header */
    181182        header = (ip_header_t *) data;
    182         header->header_length = IP_COMPUTE_HEADER_LENGTH(sizeof(ip_header_t) +
    183             ipopt_length);
     183        SET_IP_HEADER_LENGTH(header,
     184            (IP_COMPUTE_HEADER_LENGTH(sizeof(ip_header_t) + ipopt_length)));
    184185        header->ttl = (ttl ? ttl : IPDEFTTL);
    185186        header->tos = tos;
     
    187188
    188189        if (dont_fragment)
    189                 header->flags = IPFLAG_DONT_FRAGMENT;
     190                SET_IP_HEADER_FLAGS(header, IPFLAG_DONT_FRAGMENT);
    190191
    191192        return EOK;
     
    226227                *tos = header->tos;
    227228        if (dont_fragment)
    228                 *dont_fragment = header->flags & IPFLAG_DONT_FRAGMENT;
     229                *dont_fragment = GET_IP_HEADER_FLAGS(header) & IPFLAG_DONT_FRAGMENT;
    229230        if (ipopt_length) {
    230231                *ipopt_length = IP_HEADER_LENGTH(header) - sizeof(ip_header_t);
     
    258259                header_in->data_length = htons(data_length);
    259260                return EOK;
    260         /* TODO IPv6 */
     261        // TODO IPv6
    261262        } else {
    262263                return EINVAL;
Note: See TracChangeset for help on using the changeset viewer.