anjana_sreekumar@infosys.com | 991c206 | 2020-01-08 11:42:57 +0530 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd. |
| 3 | * Copyright (c) 2017 Intel Corporation |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 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. |
| 16 | */ |
| 17 | |
| 18 | #ifndef __S1AP_SCTP_CONN_H_ |
| 19 | #define __S1AP_SCTP_CONN_H_ |
| 20 | |
| 21 | #include <sys/socket.h> |
| 22 | #include <sys/types.h> |
| 23 | #include <netinet/in.h> |
| 24 | #include <netinet/sctp.h> |
| 25 | |
| 26 | #define MAX_STREAM 5 |
| 27 | #define MAX_PENDING_CONN 5 |
| 28 | #define ENB_PORT 62324 |
| 29 | |
| 30 | int create_sctp_socket(unsigned int remote_ip, unsigned short port); |
| 31 | |
| 32 | int accept_sctp_socket(int sockfd); |
| 33 | |
| 34 | int recv_sctp_msg(int sockfd, unsigned char *buf, size_t len); |
| 35 | |
| 36 | int send_sctp_msg(int connSock, unsigned char *buffer, size_t len, uint16_t stream_no); |
| 37 | |
| 38 | int close_sctp_socket(int sockfd); |
| 39 | |
| 40 | #endif /*__S1AP_SCTP_CONN_H*/ |