Changeset 849ed54 in mainline for uspace/lib/net/include/ip_client.h


Ignore:
Timestamp:
2010-03-30T18:39:04Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7553689
Parents:
7d6fe4db
Message:

Networking work:
Split the networking stack into end-user library (libsocket) and two helper libraries (libnet and libnetif).
Don't use over-the-hand compiling and linking, but rather separation of conserns.
There might be still some issues and the non-modular networking architecture is currently broken, but this will be fixed soon.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/include/ip_client.h

    r7d6fe4db r849ed54  
    4040#include <sys/types.h>
    4141
    42 #include "../structures/packet/packet.h"
    43 
    44 #include "ip_codes.h"
    45 #include "ip_interface.h"
    46 #include "socket_codes.h"
     42#include <packet/packet.h>
     43#include <ip_codes.h>
     44#include <ip_interface.h>
     45#include <socket_codes.h>
    4746
    4847/** Prepares the packet to be transfered via IP.
     
    5756 *  @returns ENOMEM if there is not enough memory left in the packet.
    5857 */
    59 int ip_client_prepare_packet(packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length);
     58extern int ip_client_prepare_packet(packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length);
    6059
    6160/** Processes the received IP packet.
     
    7170 *  @returns ENOMEM if the packet is too short to contain the IP header.
    7271 */
    73 int ip_client_process_packet(packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length);
     72extern int ip_client_process_packet(packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length);
    7473
    7574/** Returns the IP header length.
     
    7877 *  @returns Zero (0) if there is no IP header.
    7978 */
    80 size_t ip_client_header_length(packet_t packet);
     79extern size_t ip_client_header_length(packet_t packet);
    8180
    8281/** Updates the IPv4 pseudo header data length field.
     
    8887 *  @returns EINVAL if the headerlen parameter is not IPv4 pseudo header length.
    8988 */
    90 int ip_client_set_pseudo_header_data_length(ip_pseudo_header_ref header, size_t headerlen, size_t data_length);
     89extern int ip_client_set_pseudo_header_data_length(ip_pseudo_header_ref header, size_t headerlen, size_t data_length);
    9190
    9291/** Constructs the IPv4 pseudo header.
     
    108107 *  @returns ENOMEM if there is not enough memory left.
    109108 */
    110 int ip_client_get_pseudo_header(ip_protocol_t protocol, struct sockaddr * src, socklen_t srclen, struct sockaddr * dest, socklen_t destlen, size_t data_length, ip_pseudo_header_ref * header, size_t * headerlen);
     109extern int ip_client_get_pseudo_header(ip_protocol_t protocol, struct sockaddr * src, socklen_t srclen, struct sockaddr * dest, socklen_t destlen, size_t data_length, ip_pseudo_header_ref * header, size_t * headerlen);
    111110
    112111// TODO ipopt manipulation
Note: See TracChangeset for help on using the changeset viewer.