1 /******************************************************************************
3 * Copyright (c) 2020 ICT/CAS.
5 * Licensed under the O-RAN Software License, Version 1.0 (the "Software License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * https://www.o-ran.org/software
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 *******************************************************************************/
26 #include <netinet/ip.h>
27 #include <netinet/if_ether.h>
28 #include <netinet/udp.h>
29 #include <arpa/inet.h>
30 #include <sys/ioctl.h>
37 #include <stdio.h> /* for the printf() function */
39 /* includes required to create a fake IP packet */
40 #include <netinet/ip.h> /* for the IPv4 header */
41 #include <string.h> /* for the strlen() */
42 #include <rohc/rohc_buf.h> /* for the rohc_buf_*() functions */
44 /* includes required to use the compression part of the ROHC library */
45 #include <time.h> /* required by time() */
46 #include <rohc/rohc_comp.h> /* for rohc_comp_*() functions */
49 struct rohc_comp * create_compressor();
50 bool compress_with_callback(struct rohc_comp *const compressor,struct rohc_buf uncomp_packet,struct rohc_buf *const packet);