'Getting different local-port value in tcpdump when using --local-port option in curl
I'm using curl command to send the traffic to the Server. In curl command, I'm using --local-port option. Below is the command:
curl -v --interface 10.1.1.3 -b --local-port 10000 http://30.1.1.101/myfile.txt
I'm taking tcpdump to confirm that whether the local-port is used or not. Below is the tcpdump stats(image):
After checking the tcpdump, I have observed that the local-port value is different in tcpdump. It is supposed to be like 10.1.1.1:10000 not like 10.1.1.1:random_val.
So my questions are:
Is it possible to force
curlto use the samelocal-portthat I have mentioned in the command?What's the reason for getting different
local-portvalue?
Any help would be appreciated.
Solution 1:[1]
I'm also kinda new with snippets and emmets, I don't really know the difference, but I could wrap it off just enough so it worked for me. Hope this helps you too.
"todo":{
"prefix": "todo",
"body": ":root{\n\n $1\n$1\n\n}\n\nhtml{\n font-size: 62.5%;\n}\nbody{\n font-size: 16px;\n}\n*{\n margin: 0;\n text-decoration: none;\n}\n\n/*****************************INICIO*****************************/\n\n$2\n$2\n$3"
}
You just have to write the name of your emmet between quotation marks, after that write a colon and open your Brackets.
On the prefix part, you need to write the word that's gonna make your emmet appear. You could have an emmet named "main syntax" and your prefix could be simply "main" so when you write main the emmet is gonna appear.
The body part is where you write the thing that your emmet is gonna write for you each time you use it. You write it once so you don't have to write it over and over. :D
The syntax here is pretty easy to understand:
- \n is gonna make your text appear on the next line.
- $ when you use this symbol what you make is that you can write in its space. You need to write a number after the symbol $1, $2, $3... You can add one wherever you want. If you add multiple $1 all the spaces where you wrote it are gonna write the same text. When you press the tab button you change from the $1 to the $2 and from the $2 to the $3
I modified the emmet that I regularly use so you can see what I'm talking about.
- The rest is just the text or code you use.
You need to paste the code in the css.json file. To get to this file you need to go to open the command palette then write ">user" and select "Preferences: Configure User Snippets", after you click that look for the "css.json" option. Finally, paste the code between the brackets.
If you want to add a new emmet after the previous one just add a comma after your emmet bracket and start writing your new emmet, that's it. :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Aaron Stone |

