当前位置: 首页 > news >正文

新闻类网站排版网站建设网站内链检测工具

新闻类网站排版网站建设,网站内链检测工具,广州互联网营销师,怎么做秒赞网站前言 SOME/IP协议越来越多的用于汽车电子行业中#xff0c;关于协议详细完全的中文资料却没有#xff0c;所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块#xff1a; 1. SOME/IP协议讲解 2. SOME/IP-SD协议讲解 3. python/C举例调试讲解 5.1.2.4…前言 SOME/IP协议越来越多的用于汽车电子行业中关于协议详细完全的中文资料却没有所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块 1. SOME/IP协议讲解 2. SOME/IP-SD协议讲解 3. python/C举例调试讲解   5.1.2.4 Options Format Options are used to transport additional information to the entries. This includes for instance the information how a service instance is reachable (IP-Address, Transport Protocol, Port Number). 配置是 entries的 附加信息 说明了连接的方式IP、传输协议、port [PRS_SOMEIPSD_00273] Upstream requirements: RS_SOMEIPSD_00006 In order to identify the option type every option shall start with: • Length [uint16]: Specifies the length of the option in Bytes. • Type [uint8]: Specifying the type of the option. • Discardable Flag [1 bit]: Specifies, if this option can be discarded. 设置为1 接收端不支持此option ---》体现了设计的灵活性---》比如 client的两个订阅包 向不同的IP订阅不同的 serviceID 有很多options是相同的 有个别的不同。则这个包组好后可以共用发送只需要把差异点标记为discard 并同时修改options_index就行。 • Bit 1 to bit 7 are reserved and shall be 0. [PRS_SOMEIPSD_00275] Upstream requirements: RS_SOMEIPSD_00006 The discardable flag shall be set to 1 if the option can be discarded by a receiving ECU that does not support this option. 丢弃标志位设置为1 表示 对方可丢弃 可不丢弃具体是如果不支持就丢弃否则解析使用。 下图是我截图实车报文中的一条offer报文展示 -- 为了保密 做了打码 5.1.2.4.1 Configuration Option The configuration option is used to transport arbitrary configuration strings. This allows to encode additional information like the name of a service or its configuration. In additional, the configuration option allows to offer non-SOME/IP services with SOME/IP-SD. offfer的报文中 option 可以传输 string 信息 这个信息是是SOME/IP-SD格式  [PRS_SOMEIPSD_00276] Upstream requirements: RS_SOMEIPSD_00006 The format of the Configuration Option shall be as follows: 传输 string , type要设置为1 按照下面格式 序列化 • Length [uint16]: Shall be set to the total number of bytes occupied by the configuration option, excluding the 16 bit length field and the 8 bit type flag. • Type [uint8]: Shall be set to 0x01. • Discardable Flag [1 bit]: Shall be set to 1 if the Option can be discarded by the receiver. • Bit 1 to bit 7 are reserved and shall be 0. • ConfigurationString [dynamic length]: Shall carry the configuration string. [PRS_SOMEIPSD_00277] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00009 The Configuration Option shall specify a set of name-value-pairs based on the DNS TXT and DNS-SD format. [2] [3] 建议可以像这样 设置一个键值对 DNS-Based Service Discovery https://www.rfc-editor.org/rfc/rfc6763 [PRS_SOMEIPSD_00278] Upstream requirements: RS_SOMEIPSD_00006 The format of the configuration string shall start with a single byte length field that describes the number of bytes following this length field. After the length field a character sequence with the specified length shall follow. string的长度段 只占一个字节  且描述的长度不包含自己本身 ----- 我觉得有点多余 option中的长度指定可以推断出这个长度 [PRS_SOMEIPSD_00279] Upstream requirements: RS_SOMEIPSD_00006 After each character sequence another length field and a following character sequence are expected until a length field shall be set to 0x00. 它描述了一种数据格式其中包含一个字符序列character sequence后面跟着一个长度字段length field然后又是另一个字符序列直到长度字段被设置为 0x00 为止。 简单举例不是真正的例子真正使用格式是keyvalue 05 48 65 6C 6C 6F 04 57 6F 72 6C 64 00 解析过程 第一个长度字段05表示接下来的字符序列长度为 5。 字符序列48 65 6C 6C 6F → 解码为 Hello。 第二个长度字段04表示接下来的字符序列长度为 4。 字符序列57 6F 72 6C 64 → 解码为 World。 第三个长度字段00表示结束。 最终解析结果为Hello 和 World。 [PRS_SOMEIPSD_00280] Upstream requirements: RS_SOMEIPSD_00006 After a length field is set to 0x00 no characters shall follow. 上条有讲 [PRS_SOMEIPSD_00281] Upstream requirements: RS_SOMEIPSD_00006 A character sequence shall encode a key and optionally a value. [PRS_SOMEIPSD_00282] Upstream requirements: RS_SOMEIPSD_00006 The character sequences shall contain an equal character (, 0x3D) to divide key and value. 字符序列应该是 keyvalue的格式 字符串必须包含一个 号分割 键值 keyvalue 当然 是两者都存在的情况 [PRS_SOMEIPSD_00283] Upstream requirements: RS_SOMEIPSD_00006 The key shall not include an equal character and shall be at least one non-whitespace character. The characters of Key shall be printable US-ASCII values (0x20-0x7E), excluding ’’ (0x3D). Key 是编码的核心部分不能包含必须是可见字符至少包含一个非空白字符 [PRS_SOMEIPSD_00284] Upstream requirements: RS_SOMEIPSD_00006 The shall not be the first character of the sequence. key不能为空 即不能在最前面  [PRS_SOMEIPSD_00285] Upstream requirements: RS_SOMEIPSD_00006 For a character sequence without an ’’ that key shall be interpreted as present. 如果字串中 没有 号 则认为整个都是key [PRS_SOMEIPSD_00286] Upstream requirements: RS_SOMEIPSD_00006 For a character sequence ending on an ’’ that key shall be interpreted as present with empty value. 如果字串结尾是 号表示只有key ,没有value [PRS_SOMEIPSD_00287] Upstream requirements: RS_SOMEIPSD_00006 Multiple entries with the same key in a single Configuration Option shall be supported. 多条 entry 公用一个 key ’Configuration Option‘ 是允许的。 5.1.2.4.2 Load Balancing Option The Load Balancing option is used to prioritize different instances of the same service, so that a client can choose the service instance dynamically. This option will be referenced by Offer Service entries. 负载平衡选项 offer报文中 同一个serviceID 有多个 instance offer报文中可能会携带 负载平衡选项优先级选项值越小 优先级越大。还有个权重选项 值越大权重越大 具体报文格式 见下面 client端 可以根据优先级来订阅需要的实例 ---- 一般不会有这种情况 客户会在矩阵表中 指定好订阅关系 [PRS_SOMEIPSD_00542] Upstream requirements: RS_SOMEIPSD_00011 The Load Balancing Option shall carry a Priority and Weight like the DNS-SRV records, which shall be used for load balancing different service instances. [4] [PRS_SOMEIPSD_00711] Upstream requirements: RS_SOMEIPSD_00011 When looking for all service instances of a service (Service Instance set to 0xFFFF), the client shall choose the service instance with highest priority that also matches client specific criteria. Note: Client specific criteria may be applied by the client application when choosing one of the offered service instances. They are not defined in this specification, and could e.g. restrict the range of appropriate instance IDs. 这个报文 是针对 find报文 设置为0xffff 表示查找这个服务的所有Instance 如果有多个 怎么选择 这个选择的策略 协议中没有定义需要客户在应用层字节设计 当然可以选择订阅一个 多个 或全部 [PRS_SOMEIPSD_00712] Upstream requirements: RS_SOMEIPSD_00011 When having more than one service instance with highest priority (lowest value in Priority field) the service instance shall be chosen randomly based on the weights of the service instances. The probability of choosing a service instance shall be the weight of a service instance divided by the sum of the weights of all considered service instances. [PRS_SOMEIPSD_00713] Upstream requirements: RS_SOMEIPSD_00011 If an Offer Service entry references no Load Balancing option and several service instances are offered, the client shall handle the service instances without Load Balancing option as though they had the lowest priority. 如果offer中没有携带 instance 优先级选项则client端 就不能依赖优先级来选择订阅了要依赖自己的策略了。 ---- 一般不会有这种情况 客户会在矩阵表中 指定好订阅关系 [PRS_SOMEIPSD_00714] Upstream requirements: RS_SOMEIPSD_00011 When looking for a specific service instances of a service (Service Instance set to any value other than 0xFFFF), the evaluation of the Load Balancing Option does not apply.     如果想要find 确定的实例 就要把instanceID 设置为指定的值此时 “负载平衡”选项就不起作用了 具体options格式如下 [PRS_SOMEIPSD_00544] Upstream requirements: RS_SOMEIPSD_00011 The Format of the Load Balancing Option shall be as follows: • Length [uint16]: Shall be set to 0x0005. • Type [uint8]: Shall be set to 0x02. • Discardable Flag [1 bit]: Shall be set to 1 if the Option can be discarded by the receiver. • Bit 1 to bit 7 are reserved and shall be 0. • Priority [uint16]: Carries the Priority of this instance. Lower value means higher priority. • Weight [uint16]: Carries the Weight of this instance. Large value means higher probability to be chosen. 5.1.2.4.3 IPv4 Endpoint Option The IPv4 Endpoint Option is used by a SOME/IP-SD instance to signal the relevant endpoint(s). Endpoints include the local IP address, the transport layer protocol (e.g. UDP or TCP), and the port number of the sender. These ports are used for the events and notification events as well. ipv4端口选项---》端口 协议 和IP 用于 基于这些 发送event 和 method [PRS_SOMEIPSD_00305] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The IPv4 Endpoint Option shall use the Type 0x04. Type 设置为 0x04 [PRS_SOMEIPSD_00306] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The IPv4 Endpoint Option shall specify the IPv4-Address, the transport layer protocol (ISO/OSI layer 4) used, and its Port Number. IPv4 Endpoint Option 用于指定 IPv4地址  [PRS_SOMEIPSD_00307] ipv4 配置 如下 简单容易理解 Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The Format of the IPv4 Endpoint Option shall be as follows: • Length [uint16]: Shall be set to 0x0009. • Type [uint8]: Shall be set to 0x04. • Discardable Flag [1 bit]: Shall be set to 0. • Bit 1 to bit 7 are reserved and shall be 0. • IPv4-Address [uint32]: Shall transport the unicast IP-Address as four Bytes. • Reserved [uint8]: Shall be set to 0x00. • Transport Protocol (L4-Proto) [uint8]: Shall be set to the transport layer protocol (ISO/OSI layer 4) based on the IANA/IETF types (0x06: TCP, 0x11: UDP). • Transport Protocol Port Number (L4-Port) [uint16]: Shall be set to the port of the layer 4 protocol. [PRS_SOMEIPSD_00310] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The server shall use the IPv4 Endpoint Option with Offer Service entries to signal the endpoints it serves the service instance on. That is up to one UDP endpoint and up to one TCP endpoint. 服务器在提供服务实例时使用 IPv4 Endpoint Option 来通知客户端其服务实例的端点信息时每个服务实例最多可以提供一个 UDP 端点和一个 TCP 端点。 [PRS_SOMEIPSD_00380] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The endpoints the server referenced with an Offer Service entry shall also be used as source of events. That is source IP address and source port numbers for the transport protocols in the endpoint option. [PRS_SOMEIPSD_00807] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The client shall use the IPv4 Endpoint Option with Subscribe Eventgroup entries to signal the IP address and the UDP and/or TCP port numbers, on which it is ready to receive the events. Note: The client is ready to receive the events, if sockets are already opened, and any security associations required by the network security protocols (IPsec, MACsec, or other security protocols) are already established and fully operational. client 根据配置把sokcet建立好配置好mac通过 路由规则 防火墙规则就可以正常接收事件了 [PRS_SOMEIPSD_00835] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 Different provided service instances of the same service on the same ECU shall use different endpoints, so that they can be differentiated by the endpoints. Different services may share the same endpoints. 端点IPPORT 不同的serviceID可以使用相同的 端点 相同serviceID不同实例 不用使用相同端点 5.1.2.4.4 IPv6 Endpoint Option 功能和ipv4 一样 用在offer/sub 报文中 The IPv6 Endpoint Option is used by a SOME/IP-SD instance to signal the relevant endpoint(s). Endpoints include the local IP address, the transport layer protocol (e.g. UDP or TCP), and the port number of the sender. These ports are used for the events and notification events as well. [PRS_SOMEIPSD_00314] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The IPv6 Endpoint Option shall use the Type 0x06. [PRS_SOMEIPSD_00315] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The Format of the IPv6 Endpoint Option shall be as follows: 格式如下 容易理解 • Length [uint16]: Shall be set to 0x0015. • Type [uint8]: Shall be set to 0x06. • Discardable Flag [1 bit]: Shall be set to 0. • Bit 1 to bit 7 are reserved and shall be 0. • IPv6-Address [uint128]: Shall transport the unicast IP-Address as 16 Bytes. • Reserved [uint8]: Shall be set to 0x00. • Transport Protocol (L4-Proto) [uint8]: Shall be set to the transport layer protocol (ISO/OSI layer 4) based on the IANA/IETF types (0x06: TCP, 0x11: UDP). • Transport Protocol Port Number (L4-Port) [uint16]: Shall be set to the transport layer port(e.g. 30490). SOME/IP-SD IPv6 Endpoint Option shall be as shown in Figure 5.10 [PRS_SOMEIPSD_00319] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The server shall use the IPv6 Endpoint Option with Offer Service entries to signal the endpoints the services is available on. That is upto one UDP endpoint and upto one TCP endpoint. 服务器在提供服务实例时使用 IPv6 Endpoint Option 来通知客户端其服务实例的端点信息时每个服务实例最多可以提供一个 UDP 端点和一个 TCP 端点。 [PRS_SOMEIPSD_00320] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The endpoints the server referenced with an Offer Service entry shall also be used as source of events. That is source IP address and source port numbers for the transport protocols in the endpoint option. [PRS_SOMEIPSD_00321] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 The client shall use the IPv6 Endpoint Option with Subscribe Eventgroup entries to signal the IP address and the UDP and/or TCP port numbers, on which it is ready to receive the events. options中指定 源IP和Port 表示event是从哪里发出的 Note: • The client is ready to receive the events, if sockets are already opened, and any security associations required by the network security protocols (IPsec, MACsec or other security protocols) are already established and fully operational • Security association status monitoring and its implications towards Service discovery shall apply for all Service Instances using secured ports. 在这段描述中提到的安全条件是确保客户端能够在安全的网络环境下接收事件并且这些安全措施需要在客户端和网络之间的通信中生效。我们可以进一步细分这些安全条件 ### 1. **安全关联Security AssociationSA**    - **定义**安全关联是指两端通信如客户端和服务器之间的安全配置它包括加密、身份验证等信息确保通信的机密性、完整性和可用性。     - **协议支持**SA通常涉及到网络安全协议例如 **IPsec**用于IP层的加密和认证、**MACsec**用于数据链路层的加密和完整性校验等。    - **作用**这些协议可以保护通信中的数据防止被篡改、监听或伪造。 ### 2. **网络安全协议**    - **IPsec**IPsec是用于IPv6及IPv4网络中通过加密和认证保护IP通信的协议。它通过两种模式工作      - **传输模式Transport Mode**仅加密传输层数据不加密IP头部。      - **隧道模式Tunnel Mode**加密整个IP数据包包括头部和数据部分通常用于VPN。    - **MACsec**MACsec用于局域网中的数据链路层加密提供防止数据篡改、重放攻击的能力。它通过在以太网帧上加密来保护数据。 ### 3. **客户端准备接收事件的条件**    - 客户端首先需要打开相关的**socket**。这些socket是用来接收事件数据的通信端口。    - 然后客户端还必须确保所需要的安全协议如IPsec、MACsec等的**安全关联已经建立并且完全工作**。如果这些安全措施没有正确配置或未建立客户端就无法保证通信的安全性进而无法确保事件数据的正确接收。 ### 4. **安全关联的监控与服务发现**    - **安全关联状态监控**客户端和网络系统需要实时监控安全关联的状态确保所有的安全配置和加密通道在需要时都能正常工作。如果安全关联出现问题可能会影响事件接收的安全性。    - **服务发现**在基于安全端口的服务实例中服务发现过程需要考虑安全关联的状态。如果安全关联不可用或不完全客户端可能无法发现或与服务实例建立安全的连接。 ### 5. **应用场景**    - 在一些高安全要求的网络环境中例如金融、电力、政府等领域数据通信必须经过加密保护这时就会使用到这些安全协议。通过确保安全关联已建立客户端可以避免潜在的安全威胁如数据泄露或身份冒充。 ### 总结 - 客户端准备好接收事件并非仅仅依赖于端口和IP的配置还需要网络安全协议的支持以确保在安全的环境下传输数据。 - 安全协议的实施包括加密、身份验证等而安全关联的监控则确保这些协议在实际通信过程中始终有效。 [PRS_SOMEIPSD_00836] Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010 Different service instances of the same service on the same ECU shall use different endpoints, so that they can be distinguished by the endpoints. Different services may share the same endpoints. 端点IPPORT 不同的serviceID可以使用相同的 端点 相同serviceID不同实例 不用使用相同端点
http://www.hkea.cn/news/14441357/

相关文章:

  • 在哪个网站做流动补胎的广告好wordpress ping
  • 泉州公司网站建设建站平台做的网站google
  • 中小企业做网站推广禹城网站设计
  • 网站建设销售技巧话术关键词搜索神器
  • 为什么做电商网站qq技术教程wordpress
  • 公司请人做公司网站会计分录鄂州市城市建设档案馆网站
  • 网站运营风险分析wordpress 个人主题
  • 网站建设+管理系统开发中山专业门户网站制作平台
  • 江门官网建站公司郑州资助app下载
  • 电商网站建设开发维护怎么卸载安装的wordpress
  • 大庆建设局网站迁址山西谷歌seo
  • 焦作整站优化电商首页设计图
  • 随州建设网站网页翻译app
  • 新办公司网上核名在哪个网站做东莞保安招聘网
  • 深圳网站建 1设骏域网站建设中国建筑装饰公司排名
  • 钓鱼网站排名假冒建设银行最多备案资料 网站建设方案书
  • 大型网站的服务器架设与小型网站有什么不同机械行业营销型网站
  • 英文网站cms房地产公司网站建设ppt
  • 尤溪网站开发网页游戏代码
  • 成都 网站原创大邯郸网站
  • 固定ip做网站沈阳网站icp备案
  • 云南澄江县建设局网站建设工程质量管理条例2022
  • 响应式网站和展示式区别怎么在外贸公司拿订单
  • 网页设计网站总结报告怎么写高端网站建设报价
  • 做黑帽需不需要搭建网站揭阳网站制作怎样
  • jsp企业网站开发前期报告专注高密做网站的
  • 装修网站官网怎么在百度上发广告
  • 检察院门户网站建设情况网站开发有哪些框架
  • vs做网站连数据库做网站的网站
  • 网站制作大概多少钱做电影网站需要什么服务器