https://github.com/ymc-github/sh-lib-nw-fun
some function for caculating network for ymc
https://github.com/ymc-github/sh-lib-nw-fun
fun nw sh-lib ymc
Last synced: about 1 month ago
JSON representation
some function for caculating network for ymc
- Host: GitHub
- URL: https://github.com/ymc-github/sh-lib-nw-fun
- Owner: YMC-GitHub
- License: mit
- Created: 2020-06-13T01:01:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-22T10:00:39.000Z (almost 5 years ago)
- Last Synced: 2025-02-25T09:23:34.848Z (over 1 year ago)
- Topics: fun, nw, sh-lib, ymc
- Language: Shell
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# sh lib nw-fun
## desc
some function for caculating network for ymc
## deps
- [x] sh-lib-str
- [x] sh-lib-arr
- [x] sh-lib-txt
- [ ] sh-lib-time-cost
- [x] sh-lib-path-resolve
- [x] sh-lib-num-base-bc
- [ ] sh-lib-test
- [ ] sh-lib-fun
## apis
- [x] nw_cidr_to_mask
- [x] nw_cidr_from_mask
- [x] nw_cidr_to_host_bits
- [x] nw_cidr_from_host_bits
- [x] nw_mask_ini
- [x] nw_mask_cimi_sum
- [x] nw_mask_from_cidr
- [x] nw_mask_to_cidr
- [x] nw_mask_get
- [x] nw_mask_add
- [x] nw_mask_del
- [x] nw_mask_is
- [x] nw_mask_type_is
- [x] nw_ip_get
- [x] nw_ip_add
- [x] nw_ip_del
- [x] nw_ip_is
- [x] nw_ip_type_is
- [x] nw_ip_private_is
- [x] nw_ip_addr_broad_from_net
- [x] nw_ip_addr_net_from_host
- [x] nw_ip_addr_hostid
- [x] nw_ip_format_to_bin
- [x] nw_ip_addr_net_to_cidr
- [x] nw_sub_num_to_bits
- [x] nw_sub_bits_to_num
- [x] nw_sub_bits_to_mask
- [x] nw_sub_mask_to_bits
- [x] nw_sub_bits_to_cidr
- [x] nw_sub_cidr_to_bits
- [x] nw_sub_host_bits_to_num
- [x] nw_sub_host_num_to_bits
- [x] nw_sub_host_bits_to_cidr
- [x] nw_sub_host_cidr_to_bits
- [x] nw_sub_know_from_list
- [x] nw_sub_know_set
- [x] nw_sub_know_get
- [x] nw_sup_know_from_list
- [x] nw_sup_know_set
- [x] nw_sup_know_get
```sh
src/dev.api.sh
```
## feat
- [x] basic operation for `cidr`
- [x] basic operation for `mask`
- [x] basic operation for `sub`
- [x] basic operation for `sup`
- [x] apis begins with ns `nw/sup/sub/mask/cidr`
## how to use for poduction?
```sh
# get the code
# run the index file
# ./index.sh
# or import to your sh file
# source /path/to/the/index file
# simple usage
```
## how to use for developer?
```sh
# get the code
# run test
# test file is ./src/test*.sh
# eg.
./test/index.sh
#2 get some fail test
#./src/test.sh | grep "it is false"
```
## author
yemiancheng
## license
MIT