Mistake on this page?
Report an issue in GitHub or email us
emac_ctp.h
1 /*
2  * Copyright (c) 2017, ARM Limited, All Rights Reserved
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License"); you may
6  * 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, WITHOUT
13  * 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 EMAC_CTP_H
19 #define EMAC_CTP_H
20 
21 enum ctp_function {
22  CTP_NONE,
23  CTP_FORWARD,
24  CTP_REPLY
25 };
26 
27 // Test memory manager options
28 #define CTP_OPT_HEAP 0x01 // Allocate link_out() frame from heap
29 #define CTP_OPT_NON_ALIGNED 0x02 // Force memory buffers to be non-aligned
30 
31 /* Builds and sends CTP message. Forward to address is the address where echo server sends the reply.
32  Default is own Ethernet MAC address. Options can be used to specify test memory manager options.
33  */
34 #define CTP_MSG_SEND(length, send_to_address, own_address, forward_to_address, mem_mngr_options) \
35  emac_if_ctp_msg_build(length, send_to_address, own_address, forward_to_address, mem_mngr_options)
36 
37 ctp_function emac_if_ctp_header_handle(unsigned char *eth_input_frame, unsigned char *eth_output_frame, unsigned char *origin_addr, int *receipt_number);
38 void emac_if_ctp_msg_build(int eth_frame_len, const unsigned char *dest_addr, const unsigned char *origin_addr, const unsigned char *forward_addr, int options);
39 void emac_if_ctp_reply_handle(int lenght, int invalid_data_index);
40 
41 #endif /* EMAC_CTP_H */
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.