小编kot*_*rfa的帖子

计算 ICMPv6 报头的 16 位校验和

请问我根据ICMPv6协议计算16位校验和的方案是否正确。我尝试关注Wikipedia,但我不确定主要是关于两件事。

首先是什么the packet length意思 - 它是没有校验和的整个 ICMPv6 数据包的数据包长度,还是只有有效载荷?它是像在 IPv6 中一样使用八位字节吗?这个 ICMPv6 回显请求的长度是多少?

6000                                    # beginning of IPv6 packet
0000 0000 3a00 FE80 0000 0000 0000 0202 
B3FF FE1E 8329 FE80 0000 0000 0000 0202 
B3FF FE1E 8330 

8000 xxxx                               # this is beginning of the ICMP packet - type and checksum
a088 0000 0001                          # from here including this line I compute the length   
0203 0405 0607 0809 0a0b 0c0d 0e0f 1011 
1213 1415 1617 1819 …
Run Code Online (Sandbox Code Playgroud)

python checksum

3
推荐指数
1
解决办法
2576
查看次数

gcloud - 即使我是所有者并且通过 Web UI 工作正常,也没有任何 API 的权限

我是我新创建的组织的所有者,我在该组织下创建了一个项目,并将其链接到我有 1000 美元积分的组织计费帐户。通过网络用户界面,我能够启动集群、虚拟机、网络......但是当我想通过 gcloud 这样做时,我的权限被拒绝。例如:

$ gcloud compute networks list
API [compute.googleapis.com] not enabled on project [XXX]. 
Would you like to enable and retry (this will take a few minutes)? 
(y/N)?  y

ERROR: (gcloud.compute.networks.create) PERMISSION_DENIED: The caller does not have permission
Run Code Online (Sandbox Code Playgroud)

但是我可以在 Web UI GCP 中看到 API 已明确启用(并且可以使用),只是 gcloud 不允许我使用它们。gcloud 下的帐户与我在 Web 控制台中使用的帐户完全相同 - 由gcloud auth list和验证:

$ gcloud config configurations describe myproject
is_active: true
name: myproject
properties:
  compute:
    region: europe-west1
    zone: europe-west1-b
  core:
    account: <my-email>
    project: <the-project-I-want> …
Run Code Online (Sandbox Code Playgroud)

google-cloud-platform gcloud

2
推荐指数
1
解决办法
3716
查看次数

标签 统计

checksum ×1

gcloud ×1

google-cloud-platform ×1

python ×1