Pavel Kotucek | f07dc9e | 2016-12-20 12:17:37 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2016 Cisco and/or its affiliates. |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at: |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | |
| 16 | /** \brief vhost-user interface create request |
| 17 | @param client_index - opaque cookie to identify the sender |
| 18 | @param is_server - our side is socket server |
| 19 | @param sock_filename - unix socket filename, used to speak with frontend |
| 20 | @param use_custom_mac - enable or disable the use of the provided hardware address |
| 21 | @param mac_address - hardware address to use if 'use_custom_mac' is set |
| 22 | */ |
| 23 | define create_vhost_user_if |
| 24 | { |
| 25 | u32 client_index; |
| 26 | u32 context; |
| 27 | u8 is_server; |
| 28 | u8 sock_filename[256]; |
| 29 | u8 renumber; |
| 30 | u32 custom_dev_instance; |
| 31 | u8 use_custom_mac; |
| 32 | u8 mac_address[6]; |
| 33 | u8 tag[64]; |
| 34 | }; |
| 35 | |
| 36 | /** \brief vhost-user interface create response |
| 37 | @param context - sender context, to match reply w/ request |
| 38 | @param retval - return code for the request |
| 39 | @param sw_if_index - interface the operation is applied to |
| 40 | */ |
| 41 | define create_vhost_user_if_reply |
| 42 | { |
| 43 | u32 context; |
| 44 | i32 retval; |
| 45 | u32 sw_if_index; |
| 46 | }; |
| 47 | |
| 48 | /** \brief vhost-user interface modify request |
| 49 | @param client_index - opaque cookie to identify the sender |
| 50 | @param is_server - our side is socket server |
| 51 | @param sock_filename - unix socket filename, used to speak with frontend |
| 52 | */ |
| 53 | define modify_vhost_user_if |
| 54 | { |
| 55 | u32 client_index; |
| 56 | u32 context; |
| 57 | u32 sw_if_index; |
| 58 | u8 is_server; |
| 59 | u8 sock_filename[256]; |
| 60 | u8 renumber; |
| 61 | u32 custom_dev_instance; |
| 62 | }; |
| 63 | |
| 64 | /** \brief vhost-user interface modify response |
| 65 | @param context - sender context, to match reply w/ request |
| 66 | @param retval - return code for the request |
| 67 | */ |
| 68 | define modify_vhost_user_if_reply |
| 69 | { |
| 70 | u32 context; |
| 71 | i32 retval; |
| 72 | }; |
| 73 | |
| 74 | /** \brief vhost-user interface delete request |
| 75 | @param client_index - opaque cookie to identify the sender |
| 76 | */ |
| 77 | define delete_vhost_user_if |
| 78 | { |
| 79 | u32 client_index; |
| 80 | u32 context; |
| 81 | u32 sw_if_index; |
| 82 | }; |
| 83 | |
| 84 | /** \brief vhost-user interface delete response |
| 85 | @param context - sender context, to match reply w/ request |
| 86 | @param retval - return code for the request |
| 87 | */ |
| 88 | define delete_vhost_user_if_reply |
| 89 | { |
| 90 | u32 context; |
| 91 | i32 retval; |
| 92 | }; |
| 93 | |
| 94 | /** \brief Vhost-user interface details structure (fix this) |
| 95 | @param sw_if_index - index of the interface |
| 96 | @param interface_name - name of interface |
| 97 | @param virtio_net_hdr_sz - net header size |
| 98 | @param features - interface features |
| 99 | @param is_server - vhost-user server socket |
| 100 | @param sock_filename - socket filename |
| 101 | @param num_regions - number of used memory regions |
| 102 | */ |
| 103 | define sw_interface_vhost_user_details |
| 104 | { |
| 105 | u32 context; |
| 106 | u32 sw_if_index; |
| 107 | u8 interface_name[64]; |
| 108 | u32 virtio_net_hdr_sz; |
| 109 | u64 features; |
| 110 | u8 is_server; |
| 111 | u8 sock_filename[256]; |
| 112 | u32 num_regions; |
| 113 | i32 sock_errno; |
| 114 | }; |
| 115 | |
| 116 | define sw_interface_vhost_user_dump |
| 117 | { |
| 118 | u32 client_index; |
| 119 | u32 context; |
| 120 | }; |
| 121 | /* |
| 122 | * Local Variables: |
| 123 | * eval: (c-set-style "gnu") |
| 124 | * End: |
| 125 | */ |