|
|
1.1 root 1: /*
2: * Cisco router simulation platform.
3: * Copyright (c) 2007 Christophe Fillot ([email protected])
4: *
5: * ATM Virtual Segmentation & Reassembly Engine.
6: */
7:
8: #ifndef __ATM_VSAR_H__
9: #define __ATM_VSAR_H__
10:
11: #include <pthread.h>
12:
13: #include "utils.h"
14: #include "net_io.h"
15:
16: #define ATM_REAS_MAX_SIZE 16384
17:
18: /* Reassembly Context */
19: struct atm_reas_context {
20: m_uint8_t buffer[ATM_REAS_MAX_SIZE];
21: size_t buf_pos;
22: size_t len;
23: };
24:
25: /* Send an AAL5 packet through an NIO (segmentation) */
26: int atm_aal5_send(netio_desc_t *nio,u_int vpi,u_int vci,
27: struct iovec *iov,int iovcnt);
28:
29: /* Reset a receive context */
30: void atm_aal5_recv_reset(struct atm_reas_context *arc);
31:
32: /* Receive an ATM cell and process reassembly */
33: int atm_aal5_recv(struct atm_reas_context *arc,m_uint8_t *cell);
34:
35: /* Send a packet through a rfc1483 bridge encap */
36: int atm_aal5_send_rfc1483b(netio_desc_t *nio,u_int vpi,u_int vci,
37: void *pkt,size_t len);
38:
39: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.