Changeset 28a3e74 in mainline for uspace/lib/net/il/ip_client.c
- Timestamp:
- 2011-04-02T09:22:46Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 250dbef, b2a081ae
- Parents:
- ea53529
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/il/ip_client.c
rea53529 r28a3e74 123 123 return EOK; 124 124 125 / / TODO IPv6125 /* TODO IPv6 */ 126 126 /* case AF_INET6: 127 127 if (addrlen != sizeof(struct sockaddr_in6)) … … 159 159 size_t padding; 160 160 161 // compute the padding if IP options are set 162 // multiple of 4 bytes 161 /* 162 * Compute the padding if IP options are set 163 * multiple of 4 bytes 164 */ 163 165 padding = ipopt_length % 4; 164 166 if (padding) { … … 167 169 } 168 170 169 / / prefix the header171 /* Prefix the header */ 170 172 data = (uint8_t *) packet_prefix(packet, sizeof(ip_header_t) + padding); 171 173 if (!data) 172 174 return ENOMEM; 173 175 174 / / add the padding176 /* Add the padding */ 175 177 while (padding--) 176 178 data[sizeof(ip_header_t) + padding] = IPOPT_NOOP; 177 179 178 / / set the header180 /* Set the header */ 179 181 header = (ip_header_t *) data; 180 182 header->header_length = IP_COMPUTE_HEADER_LENGTH(sizeof(ip_header_t) + … … 256 258 header_in->data_length = htons(data_length); 257 259 return EOK; 258 / / TODO IPv6260 /* TODO IPv6 */ 259 261 } else { 260 262 return EINVAL;
Note:
See TracChangeset
for help on using the changeset viewer.